diff --git a/demos/ARMCM3-STM32F103-GCC/board.h b/demos/ARMCM3-STM32F103-GCC/board.h index 2fd5757e4..8d240d02e 100644 --- a/demos/ARMCM3-STM32F103-GCC/board.h +++ b/demos/ARMCM3-STM32F103-GCC/board.h @@ -29,8 +29,6 @@ #ifndef __STM32F10x_MAP_H #include "stm32lib/stm32f10x_map.h" #endif -#define FALSE FALSE -#define TRUE TRUE #define BOARD_OLIMEX_STM32_P103 diff --git a/ports/ARM7-AT91SAM7X/port.dox b/ports/ARM7-AT91SAM7X/port.dox index 8c72bfbb6..b8b2c624f 100644 --- a/ports/ARM7-AT91SAM7X/port.dox +++ b/ports/ARM7-AT91SAM7X/port.dox @@ -11,3 +11,13 @@ * @ingroup ARM7 */ /** @} */ + +/** + * @defgroup AT91SAM7X_SERIAL UART Support + * @{ + * @brief USART peripherals support. + * @details The serial driver supports the AT91SAM7X USART peripherals. + * + * @ingroup AT91SAM7X + */ +/** @} */ diff --git a/ports/ARM7-AT91SAM7X/sam7x_serial.h b/ports/ARM7-AT91SAM7X/sam7x_serial.h index 18e4a5f88..236f29e5a 100644 --- a/ports/ARM7-AT91SAM7X/sam7x_serial.h +++ b/ports/ARM7-AT91SAM7X/sam7x_serial.h @@ -17,14 +17,54 @@ along with this program. If not, see . */ +/** + * @file ports/ARM7-AT91SAM7X/sam7x_serial.h + * @brief AT91SAM7X Serial driver macros and structures. + * @addtogroup AT91SAM7X_SERIAL + * @{ + */ + #ifndef _SAM7X_SERIAL_H_ #define _SAM7X_SERIAL_H_ -/* - * Configuration parameter, you can change the depth of the queue buffers - * depending on the requirements of your application. +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 128 bytes for both the transmission and receive buffers. */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) #define SERIAL_BUFFERS_SIZE 128 +#endif + +/** + * @brief Default bit rate. + * @details Configuration parameter, at startup the UARTs are configured at + * this speed. + * @note It is possible to use @p SetUART() in order to change the working + * parameters at runtime. + */ +#if !defined(AT91SAM7X_UART_BITRATE) || defined(__DOXYGEN__) +#define SAM7X_UART_BITRATE 38400 +#endif + +/** + * @brief UART0 driver enable switch. + * @details If set to 1 the support for USART1 is included. + * @note The default is 1. + */ +#if !defined(USE_LPC214x_UART0) || defined(__DOXYGEN__) +#define USE_SAM7X_USART0 1 +#endif + +/** + * @brief UART1 driver enable switch. + * @details If set to 1 the support for USART2 is included. + * @note The default is 1. + */ +#if !defined(USE_LPC214x_UART1) || defined(__DOXYGEN__) +#define USE_SAM7X_USART1 1 +#endif #ifdef __cplusplus extern "C" { @@ -37,6 +77,10 @@ extern "C" { } #endif +/** @cond never*/ extern FullDuplexDriver COM1, COM2; +/** @endcond*/ #endif /* _SAM7X_SERIAL_H_ */ + +/** @} */ diff --git a/ports/ARM7-LPC214x/lpc214x_serial.h b/ports/ARM7-LPC214x/lpc214x_serial.h index ee60a48f4..fbba6a365 100644 --- a/ports/ARM7-LPC214x/lpc214x_serial.h +++ b/ports/ARM7-LPC214x/lpc214x_serial.h @@ -70,9 +70,9 @@ * @note The default is @p TRUE . */ #if !defined(USE_LPC214x_UART0) || defined(__DOXYGEN__) -#define USE_LPC214x_UART0 TRUE +#define USE_LPC214x_UART0 TRUE #endif - + /** * @brief UART1 driver enable switch. * @details If set to @p TRUE the support for USART2 is included. diff --git a/ports/ARM7-LPC214x/lpc214x_ssp.h b/ports/ARM7-LPC214x/lpc214x_ssp.h index 411ef5016..01e8b3a93 100644 --- a/ports/ARM7-LPC214x/lpc214x_ssp.h +++ b/ports/ARM7-LPC214x/lpc214x_ssp.h @@ -29,7 +29,7 @@ /** * @brief SSP bus mutual exclusion control. - * @details Configuration parameter, if defined this macro enforces mutual + * @details Configuration parameter, if set to @p TRUE enforces mutual * exclusion when invoking @p sspAcquireBus() and @p sspReleaseBus(). * @note The internally used synchronization mechanism is a @p Semaphore. * @todo Make it use Mutexes or Semaphores like the Heap subsystem. diff --git a/ports/ARMCM3-STM32F103/stm32_serial.h b/ports/ARMCM3-STM32F103/stm32_serial.h index 4f0c622b2..7393f718c 100644 --- a/ports/ARMCM3-STM32F103/stm32_serial.h +++ b/ports/ARMCM3-STM32F103/stm32_serial.h @@ -63,7 +63,7 @@ * @note The default is @p TRUE. */ #if !defined(USE_STM32_USART2) || defined(__DOXYGEN__) -#define USE_STM32_USART2 1 +#define USE_STM32_USART2 TRUE #endif /**