summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/str71x
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/str71x')
-rw-r--r--nuttx/arch/arm/src/str71x/chip.h3
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_adc12.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_apb.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_bspi.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_can.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_decodeirq.c7
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_eic.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_emi.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_flash.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_gpio.h4
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_i2c.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_internal.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_irq.c17
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_lowputc.c12
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_map.h3
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_pcu.h4
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_prccu.c8
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_rccu.h4
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_rtc.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_serial.c111
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_timer.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_timerisr.c9
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_uart.h4
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_usb.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_wdog.h6
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_xti.h6
26 files changed, 137 insertions, 133 deletions
diff --git a/nuttx/arch/arm/src/str71x/chip.h b/nuttx/arch/arm/src/str71x/chip.h
index abd9c5e26..945141993 100644
--- a/nuttx/arch/arm/src/str71x/chip.h
+++ b/nuttx/arch/arm/src/str71x/chip.h
@@ -41,7 +41,6 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
#include "str71x_map.h" /* Memory map */
#include "str71x_emi.h" /* External memory interface */
@@ -63,7 +62,7 @@
#include "str71x_flash.h" /* Flash */
/************************************************************************************
- * Definitions
+ * Pre-processor Definitions
************************************************************************************/
/************************************************************************************
diff --git a/nuttx/arch/arm/src/str71x/str71x_adc12.h b/nuttx/arch/arm/src/str71x/str71x_adc12.h
index a4393ee94..1f15adfb7 100644
--- a/nuttx/arch/arm/src/str71x/str71x_adc12.h
+++ b/nuttx/arch/arm/src/str71x/str71x_adc12.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_adc12.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* ADC12 registers ******************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_apb.h b/nuttx/arch/arm/src/str71x/str71x_apb.h
index f5453dc2b..4b8efe2a9 100644
--- a/nuttx/arch/arm/src/str71x/str71x_apb.h
+++ b/nuttx/arch/arm/src/str71x/str71x_apb.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_apb.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* APB register offsets *************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_bspi.h b/nuttx/arch/arm/src/str71x/str71x_bspi.h
index 967b31dbe..537563c3d 100644
--- a/nuttx/arch/arm/src/str71x/str71x_bspi.h
+++ b/nuttx/arch/arm/src/str71x/str71x_bspi.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_bspi.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Register Offsets *****************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_can.h b/nuttx/arch/arm/src/str71x/str71x_can.h
index a4dab4e2a..a38630d66 100644
--- a/nuttx/arch/arm/src/str71x/str71x_can.h
+++ b/nuttx/arch/arm/src/str71x/str71x_can.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_can.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Registers ************************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_decodeirq.c b/nuttx/arch/arm/src/str71x/str71x_decodeirq.c
index ac53bf0de..035ec5318 100644
--- a/nuttx/arch/arm/src/str71x/str71x_decodeirq.c
+++ b/nuttx/arch/arm/src/str71x/str71x_decodeirq.c
@@ -38,7 +38,8 @@
********************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
+#include <stdint.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <assert.h>
@@ -50,7 +51,7 @@
#include "chip.h"
/********************************************************************************
- * Definitions
+ * Pre-procesor Definitions
********************************************************************************/
/********************************************************************************
@@ -84,7 +85,7 @@
*
********************************************************************************/
-void up_decodeirq(uint32 *regs)
+void up_decodeirq(uint32_t *regs)
{
#ifdef CONFIG_SUPPRESS_INTERRUPTS
up_ledon(LED_INIRQ);
diff --git a/nuttx/arch/arm/src/str71x/str71x_eic.h b/nuttx/arch/arm/src/str71x/str71x_eic.h
index 74cf59257..7b0301695 100644
--- a/nuttx/arch/arm/src/str71x/str71x_eic.h
+++ b/nuttx/arch/arm/src/str71x/str71x_eic.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_eic.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include <arch/irq.h>
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Enhanced Interupt Controller (EIC) register offsets ******************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_emi.h b/nuttx/arch/arm/src/str71x/str71x_emi.h
index 27972c5b4..68c35cd07 100644
--- a/nuttx/arch/arm/src/str71x/str71x_emi.h
+++ b/nuttx/arch/arm/src/str71x/str71x_emi.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_emi.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* External Memory Interfac (EMI) register offset ***********************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_flash.h b/nuttx/arch/arm/src/str71x/str71x_flash.h
index c21c34c88..352972d48 100644
--- a/nuttx/arch/arm/src/str71x/str71x_flash.h
+++ b/nuttx/arch/arm/src/str71x/str71x_flash.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_flash.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Flash registers ******************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_gpio.h b/nuttx/arch/arm/src/str71x/str71x_gpio.h
index d8e307ec3..dbcd3cdeb 100644
--- a/nuttx/arch/arm/src/str71x/str71x_gpio.h
+++ b/nuttx/arch/arm/src/str71x/str71x_gpio.h
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* GPIO register offsets ************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_i2c.h b/nuttx/arch/arm/src/str71x/str71x_i2c.h
index e1a8ab686..8a0cd498f 100644
--- a/nuttx/arch/arm/src/str71x/str71x_i2c.h
+++ b/nuttx/arch/arm/src/str71x/str71x_i2c.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_i2c.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Register offets ******************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_internal.h b/nuttx/arch/arm/src/str71x/str71x_internal.h
index 5dea598de..468c48600 100644
--- a/nuttx/arch/arm/src/str71x/str71x_internal.h
+++ b/nuttx/arch/arm/src/str71x/str71x_internal.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_internal.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include <arch/board/board.h>
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Calculate the values of PCLK1 and PCLK2 from settings in board.h.
diff --git a/nuttx/arch/arm/src/str71x/str71x_irq.c b/nuttx/arch/arm/src/str71x/str71x_irq.c
index d9804e174..2f9570d02 100644
--- a/nuttx/arch/arm/src/str71x/str71x_irq.c
+++ b/nuttx/arch/arm/src/str71x/str71x_irq.c
@@ -38,7 +38,8 @@
****************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
+#include <stdint.h>
#include <errno.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
@@ -49,14 +50,14 @@
#include "chip.h"
/****************************************************************************
- * Definitions
+ * Pre-procesor Definitions
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
-uint32 *current_regs;
+uint32_t *current_regs;
/****************************************************************************
* Private Data
@@ -116,7 +117,7 @@ void up_irqinitialize(void)
void up_disable_irq(int irq)
{
- uint32 reg32;
+ uint32_t reg32;
if ((unsigned)irq < NR_IRQS)
{
@@ -138,7 +139,7 @@ void up_disable_irq(int irq)
void up_enable_irq(int irq)
{
- uint32 reg32;
+ uint32_t reg32;
if ((unsigned)irq < NR_IRQS)
{
@@ -160,7 +161,7 @@ void up_enable_irq(int irq)
void up_maskack_irq(int irq)
{
- uint32 reg32;
+ uint32_t reg32;
if ((unsigned)irq < NR_IRQS)
{
@@ -190,8 +191,8 @@ void up_maskack_irq(int irq)
int up_prioritize_irq(int irq, int priority)
{
- uint32 addr;
- uint32 reg32;
+ uint32_t addr;
+ uint32_t reg32;
/* The current interrupt priority (CIP) is always zero, so a minimum prioriy
* of one is enforced to prevent disabling the interrupt.
diff --git a/nuttx/arch/arm/src/str71x/str71x_lowputc.c b/nuttx/arch/arm/src/str71x/str71x_lowputc.c
index ae20cbb26..bf81f5b66 100644
--- a/nuttx/arch/arm/src/str71x/str71x_lowputc.c
+++ b/nuttx/arch/arm/src/str71x/str71x_lowputc.c
@@ -1,7 +1,7 @@
/**************************************************************************
* arch/arm/src/str71x/str71x_lowputc.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@
**************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include "up_internal.h"
#include "up_arch.h"
@@ -47,7 +47,7 @@
#include "str71x_internal.h"
/**************************************************************************
- * Private Definitions
+ * Pre-procesor Definitions
**************************************************************************/
/* Configuration **********************************************************/
@@ -259,7 +259,7 @@ void up_lowputc(char ch)
/* Then send the character */
- putreg16((uint16)ch, STR71X_UART_TXBUFR(STR71X_UART_BASE));
+ putreg16((uint16_t)ch, STR71X_UART_TXBUFR(STR71X_UART_BASE));
#endif
}
@@ -277,12 +277,12 @@ void up_lowsetup(void)
{
#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG)
- uint16 reg16;
+ uint16_t reg16;
/* Enable the selected console device */
/* Set the UART baud rate */
- putreg16((uint16)UART_BAUDRATE, STR71X_UART_BR(STR71X_UART_BASE));
+ putreg16((uint16_t)UART_BAUDRATE, STR71X_UART_BR(STR71X_UART_BASE));
/* Configure the UART control registers */
diff --git a/nuttx/arch/arm/src/str71x/str71x_map.h b/nuttx/arch/arm/src/str71x/str71x_map.h
index 67abd49d7..ad29e4d8d 100644
--- a/nuttx/arch/arm/src/str71x/str71x_map.h
+++ b/nuttx/arch/arm/src/str71x/str71x_map.h
@@ -41,10 +41,9 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Memory Map ***********************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_pcu.h b/nuttx/arch/arm/src/str71x/str71x_pcu.h
index 9883b3331..19050253e 100644
--- a/nuttx/arch/arm/src/str71x/str71x_pcu.h
+++ b/nuttx/arch/arm/src/str71x/str71x_pcu.h
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Power Control Unit (PCU) register offsets ****************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_prccu.c b/nuttx/arch/arm/src/str71x/str71x_prccu.c
index f43958539..61cee03dd 100644
--- a/nuttx/arch/arm/src/str71x/str71x_prccu.c
+++ b/nuttx/arch/arm/src/str71x/str71x_prccu.c
@@ -38,8 +38,8 @@
********************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <assert.h>
#include <debug.h>
@@ -51,7 +51,7 @@
#include "str71x_internal.h"
/********************************************************************************
- * Definitions
+ * Pre-procesor Definitions
********************************************************************************/
/* Select set of peripherals to be enabled */
@@ -359,8 +359,8 @@
void str71x_prccuinit(void)
{
- uint32 reg32;
- uint16 reg16;
+ uint32_t reg32;
+ uint16_t reg16;
/* Divide RCLK to obtain PCLK1 & 2 clock for the APB1 & 2 peripherals. The divider
* values are provided in board.h
diff --git a/nuttx/arch/arm/src/str71x/str71x_rccu.h b/nuttx/arch/arm/src/str71x/str71x_rccu.h
index 18bd448d0..858bd8089 100644
--- a/nuttx/arch/arm/src/str71x/str71x_rccu.h
+++ b/nuttx/arch/arm/src/str71x/str71x_rccu.h
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Reset and Clock Control Unit (RCCU) register offsets *****************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_rtc.h b/nuttx/arch/arm/src/str71x/str71x_rtc.h
index c9ac48d9e..634638f7e 100644
--- a/nuttx/arch/arm/src/str71x/str71x_rtc.h
+++ b/nuttx/arch/arm/src/str71x/str71x_rtc.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_rtc.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* RTC Registers ********************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_serial.c b/nuttx/arch/arm/src/str71x/str71x_serial.c
index 481603875..da4d280eb 100644
--- a/nuttx/arch/arm/src/str71x/str71x_serial.c
+++ b/nuttx/arch/arm/src/str71x/str71x_serial.c
@@ -38,7 +38,10 @@
****************************************************************************/
#include <nuttx/config.h>
+
#include <sys/types.h>
+#include <stdint.h>
+#include <stdbool.h>
#include <unistd.h>
#include <semaphore.h>
#include <string.h>
@@ -56,7 +59,7 @@
#include "str71x_internal.h"
/****************************************************************************
- * Definitions
+ * Pre-procesor Definitions
****************************************************************************/
/* Some sanity checks *******************************************************/
@@ -221,14 +224,14 @@
struct up_dev_s
{
- uint32 uartbase; /* Base address of UART registers */
- uint32 baud; /* Configured baud */
- uint16 ier; /* Saved IER value */
- uint16 sr; /* Saved SR value (only used during interrupt processing) */
- ubyte irq; /* IRQ associated with this UART */
- ubyte parity; /* 0=none, 1=odd, 2=even */
- ubyte bits; /* Number of bits (7 or 8) */
- boolean stopbits2; /* TRUE: Configure with 2 stop bits instead of 1 */
+ uint32_t uartbase; /* Base address of UART registers */
+ uint32_t baud; /* Configured baud */
+ uint16_t ier; /* Saved IER value */
+ uint16_t sr; /* Saved SR value (only used during interrupt processing) */
+ uint8_t irq; /* IRQ associated with this UART */
+ uint8_t parity; /* 0=none, 1=odd, 2=even */
+ uint8_t bits; /* Number of bits (7 or 8) */
+ bool stopbits2; /* true: Configure with 2 stop bits instead of 1 */
};
/****************************************************************************
@@ -237,29 +240,29 @@ struct up_dev_s
/* Internal Helpers */
-static inline uint16 up_serialin(struct up_dev_s *priv, int offset);
-static inline void up_serialout(struct up_dev_s *priv, int offset, uint16 value);
-static inline void up_disableuartint(struct up_dev_s *priv, uint16 *ier);
-static inline void up_restoreuartint(struct up_dev_s *priv, uint16 ier);
+static inline uint16_t up_serialin(struct up_dev_s *priv, int offset);
+static inline void up_serialout(struct up_dev_s *priv, int offset, uint16_t value);
+static inline void up_disableuartint(struct up_dev_s *priv, uint16_t *ier);
+static inline void up_restoreuartint(struct up_dev_s *priv, uint16_t ier);
#ifdef HAVE_CONSOLE
static inline void up_waittxnotfull(struct up_dev_s *priv);
#endif
/* Serial Driver Methods */
-static int up_setup(struct uart_dev_s *dev);
-static void up_shutdown(struct uart_dev_s *dev);
-static int up_attach(struct uart_dev_s *dev);
-static void up_detach(struct uart_dev_s *dev);
-static int up_interrupt(int irq, void *context);
-static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
-static int up_receive(struct uart_dev_s *dev, uint32 *status);
-static void up_rxint(struct uart_dev_s *dev, boolean enable);
-static boolean up_rxavailable(struct uart_dev_s *dev);
-static void up_send(struct uart_dev_s *dev, int ch);
-static void up_txint(struct uart_dev_s *dev, boolean enable);
-static boolean up_txready(struct uart_dev_s *dev);
-static boolean up_txempty(struct uart_dev_s *dev);
+static int up_setup(struct uart_dev_s *dev);
+static void up_shutdown(struct uart_dev_s *dev);
+static int up_attach(struct uart_dev_s *dev);
+static void up_detach(struct uart_dev_s *dev);
+static int up_interrupt(int irq, void *context);
+static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
+static int up_receive(struct uart_dev_s *dev, uint32_t *status);
+static void up_rxint(struct uart_dev_s *dev, bool enable);
+static bool up_rxavailable(struct uart_dev_s *dev);
+static void up_send(struct uart_dev_s *dev, int ch);
+static void up_txint(struct uart_dev_s *dev, bool enable);
+static bool up_txready(struct uart_dev_s *dev);
+static bool up_txempty(struct uart_dev_s *dev);
/****************************************************************************
* Private Variables
@@ -428,7 +431,7 @@ static uart_dev_t g_uart3port =
* Name: up_serialin
****************************************************************************/
-static inline uint16 up_serialin(struct up_dev_s *priv, int offset)
+static inline uint16_t up_serialin(struct up_dev_s *priv, int offset)
{
return getreg16(priv->uartbase + offset);
}
@@ -437,7 +440,7 @@ static inline uint16 up_serialin(struct up_dev_s *priv, int offset)
* Name: up_serialout
****************************************************************************/
-static inline void up_serialout(struct up_dev_s *priv, int offset, uint16 value)
+static inline void up_serialout(struct up_dev_s *priv, int offset, uint16_t value)
{
putreg16(value, priv->uartbase + offset);
}
@@ -446,7 +449,7 @@ static inline void up_serialout(struct up_dev_s *priv, int offset, uint16 value)
* Name: up_disableuartint
****************************************************************************/
-static inline void up_disableuartint(struct up_dev_s *priv, uint16 *ier)
+static inline void up_disableuartint(struct up_dev_s *priv, uint16_t *ier)
{
if (ier)
{
@@ -461,7 +464,7 @@ static inline void up_disableuartint(struct up_dev_s *priv, uint16 *ier)
* Name: up_restoreuartint
****************************************************************************/
-static inline void up_restoreuartint(struct up_dev_s *priv, uint16 ier)
+static inline void up_restoreuartint(struct up_dev_s *priv, uint16_t ier)
{
priv->ier = ier;
up_serialout(priv, STR71X_UART_IER_OFFSET, ier);
@@ -505,9 +508,9 @@ static int up_setup(struct uart_dev_s *dev)
{
#ifndef CONFIG_SUPPRESS_UART_CONFIG
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- uint32 divisor;
- uint32 baud;
- uint16 cr;
+ uint32_t divisor;
+ uint32_t baud;
+ uint16_t cr;
/* Set the BAUD rate */
@@ -663,7 +666,7 @@ static int up_interrupt(int irq, void *context)
struct uart_dev_s *dev = NULL;
struct up_dev_s *priv;
int passes;
- boolean handled;
+ bool handled;
#ifdef CONFIG_STR71X_UART0
if (g_uart0priv.irq == irq)
@@ -704,10 +707,10 @@ static int up_interrupt(int irq, void *context)
* until we have been looping for a long time.
*/
- handled = TRUE;
+ handled = true;
for (passes = 0; passes < 256 && handled; passes++)
{
- handled = FALSE;
+ handled = false;
/* Get the current UART status */
@@ -721,7 +724,7 @@ static int up_interrupt(int irq, void *context)
/* Rx buffer not empty ... process incoming bytes */
uart_recvchars(dev);
- handled = TRUE;
+ handled = true;
}
/* Handle outgoing, transmit bytes */
@@ -732,7 +735,7 @@ static int up_interrupt(int irq, void *context)
/* Tx FIFO not full ... process outgoing bytes */
uart_xmitchars(dev);
- handled = TRUE;
+ handled = true;
}
}
@@ -787,13 +790,13 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
*
****************************************************************************/
-static int up_receive(struct uart_dev_s *dev, uint32 *status)
+static int up_receive(struct uart_dev_s *dev, uint32_t *status)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- uint16 rxbufr;
+ uint16_t rxbufr;
rxbufr = up_serialin(priv, STR71X_UART_RXBUFR_OFFSET);
- *status = (uint32)priv->sr << 16 | rxbufr;
+ *status = (uint32_t)priv->sr << 16 | rxbufr;
return rxbufr & 0xff;
}
@@ -805,7 +808,7 @@ static int up_receive(struct uart_dev_s *dev, uint32 *status)
*
****************************************************************************/
-static void up_rxint(struct uart_dev_s *dev, boolean enable)
+static void up_rxint(struct uart_dev_s *dev, bool enable)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
if (enable)
@@ -829,11 +832,11 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable)
* Name: up_rxavailable
*
* Description:
- * Return TRUE if the receive fifo is not empty
+ * Return true if the receive fifo is not empty
*
****************************************************************************/
-static boolean up_rxavailable(struct uart_dev_s *dev)
+static bool up_rxavailable(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
return ((up_serialin(priv, STR71X_UART_SR_OFFSET) & RXAVAILABLE_BITS) != 0);
@@ -850,7 +853,7 @@ static boolean up_rxavailable(struct uart_dev_s *dev)
static void up_send(struct uart_dev_s *dev, int ch)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- up_serialout(priv, STR71X_UART_TXBUFR_OFFSET, (uint16)ch);
+ up_serialout(priv, STR71X_UART_TXBUFR_OFFSET, (uint16_t)ch);
}
/****************************************************************************
@@ -861,7 +864,7 @@ static void up_send(struct uart_dev_s *dev, int ch)
*
****************************************************************************/
-static void up_txint(struct uart_dev_s *dev, boolean enable)
+static void up_txint(struct uart_dev_s *dev, bool enable)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
if (enable)
@@ -885,11 +888,11 @@ static void up_txint(struct uart_dev_s *dev, boolean enable)
* Name: up_txready
*
* Description:
- * Return TRUE if the tranmsit fifo is not full
+ * Return true if the tranmsit fifo is not full
*
****************************************************************************/
-static boolean up_txready(struct uart_dev_s *dev)
+static bool up_txready(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
return ((up_serialin(priv, STR71X_UART_SR_OFFSET) & STR71X_UARTSR_TF) == 0);
@@ -899,11 +902,11 @@ static boolean up_txready(struct uart_dev_s *dev)
* Name: up_txempty
*
* Description:
- * Return TRUE if the transmit fifo is empty
+ * Return true if the transmit fifo is empty
*
****************************************************************************/
-static boolean up_txempty(struct uart_dev_s *dev)
+static bool up_txempty(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
return ((up_serialin(priv, STR71X_UART_SR_OFFSET) & STR71X_UARTSR_TE) != 0);
@@ -945,7 +948,7 @@ void up_earlyserialinit(void)
/* Configuration whichever one is the console */
#ifdef HAVE_CONSOLE
- CONSOLE_DEV.isconsole = TRUE;
+ CONSOLE_DEV.isconsole = true;
up_setup(&CONSOLE_DEV);
#endif
}
@@ -993,11 +996,11 @@ int up_putc(int ch)
{
#ifdef HAVE_CONSOLE
struct up_dev_s *priv = (struct up_dev_s*)CONSOLE_DEV.priv;
- uint16 ier;
+ uint16_t ier;
up_disableuartint(priv, &ier);
up_waittxnotfull(priv);
- up_serialout(priv, STR71X_UART_TXBUFR_OFFSET, (uint16)ch);
+ up_serialout(priv, STR71X_UART_TXBUFR_OFFSET, (uint16_t)ch);
/* Check for LF */
@@ -1006,7 +1009,7 @@ int up_putc(int ch)
/* Add CR */
up_waittxnotfull(priv);
- up_serialout(priv, STR71X_UART_TXBUFR_OFFSET, (uint16)'\r');
+ up_serialout(priv, STR71X_UART_TXBUFR_OFFSET, (uint16_t)'\r');
}
up_waittxnotfull(priv);
diff --git a/nuttx/arch/arm/src/str71x/str71x_timer.h b/nuttx/arch/arm/src/str71x/str71x_timer.h
index 331c538de..2076a1d1d 100644
--- a/nuttx/arch/arm/src/str71x/str71x_timer.h
+++ b/nuttx/arch/arm/src/str71x/str71x_timer.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_timer.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Register offsets *****************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_timerisr.c b/nuttx/arch/arm/src/str71x/str71x_timerisr.c
index 7add001c8..238e0eb77 100644
--- a/nuttx/arch/arm/src/str71x/str71x_timerisr.c
+++ b/nuttx/arch/arm/src/str71x/str71x_timerisr.c
@@ -38,7 +38,8 @@
****************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
+#include <stdint.h>
#include <time.h>
#include <debug.h>
#include <nuttx/arch.h>
@@ -52,7 +53,7 @@
#include "str71x_internal.h"
/****************************************************************************
- * Definitions
+ * Pre-procesor Definitions
****************************************************************************/
/* Configuration */
@@ -131,9 +132,9 @@
*
****************************************************************************/
-int up_timerisr(int irq, uint32 *regs)
+int up_timerisr(int irq, uint32_t *regs)
{
- uint16 ocar;
+ uint16_t ocar;
/* Clear all the output compare A interrupt status bit */
diff --git a/nuttx/arch/arm/src/str71x/str71x_uart.h b/nuttx/arch/arm/src/str71x/str71x_uart.h
index 4bf95db61..9178062c4 100644
--- a/nuttx/arch/arm/src/str71x/str71x_uart.h
+++ b/nuttx/arch/arm/src/str71x/str71x_uart.h
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Registers offsets ****************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_usb.h b/nuttx/arch/arm/src/str71x/str71x_usb.h
index de32637b9..7fcbf5727 100644
--- a/nuttx/arch/arm/src/str71x/str71x_usb.h
+++ b/nuttx/arch/arm/src/str71x/str71x_usb.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_usb.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* USB registers ********************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_wdog.h b/nuttx/arch/arm/src/str71x/str71x_wdog.h
index 36059e58c..75b89ab89 100644
--- a/nuttx/arch/arm/src/str71x/str71x_wdog.h
+++ b/nuttx/arch/arm/src/str71x/str71x_wdog.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_wdog.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* Registers ************************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_xti.h b/nuttx/arch/arm/src/str71x/str71x_xti.h
index 45f8778af..bbe3c46e0 100644
--- a/nuttx/arch/arm/src/str71x/str71x_xti.h
+++ b/nuttx/arch/arm/src/str71x/str71x_xti.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_xti.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <sys/types.h>
+
#include "str71x_map.h"
/************************************************************************************
- * Definitions
+ * Pre-procesor Definitions
************************************************************************************/
/* External Interupt Controller (XTI) registers *************************************/