diff options
| author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-09 10:48:08 +0000 |
|---|---|---|
| committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-09 10:48:08 +0000 |
| commit | b7985b957d0c259e9869763199c5cbf8ae9f4709 (patch) | |
| tree | cb1cff3966c06b52cbba51cceb4b659dd9f25562 /os/hal/templates/uart_lld.c | |
| parent | ce7f7103df5f634f7b57d90e115c5824adcb68a0 (diff) | |
| download | ChibiOS-b7985b957d0c259e9869763199c5cbf8ae9f4709.tar.gz ChibiOS-b7985b957d0c259e9869763199c5cbf8ae9f4709.tar.bz2 ChibiOS-b7985b957d0c259e9869763199c5cbf8ae9f4709.zip | |
MISRA pass on low level device drivers templates.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7739 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates/uart_lld.c')
| -rw-r--r-- | os/hal/templates/uart_lld.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/os/hal/templates/uart_lld.c b/os/hal/templates/uart_lld.c index 5617b7e2d..7b93db51f 100644 --- a/os/hal/templates/uart_lld.c +++ b/os/hal/templates/uart_lld.c @@ -24,7 +24,7 @@ #include "hal.h"
-#if HAL_USE_UART || defined(__DOXYGEN__)
+#if (HAL_USE_UART == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -37,7 +37,7 @@ /**
* @brief UART1 driver identifier.
*/
-#if PLATFORM_UART_USE_UART1 || defined(__DOXYGEN__)
+#if (PLATFORM_UART_USE_UART1 == TRUE) || defined(__DOXYGEN__)
UARTDriver UARTD1;
#endif
@@ -64,10 +64,10 @@ UARTDriver UARTD1; */
void uart_lld_init(void) {
-#if PLATFORM_UART_USE_UART1
+#if PLATFORM_UART_USE_UART1 == TRUE
/* Driver initialization.*/
uartObjectInit(&UARTD1);
-#endif /* PLATFORM_UART_USE_UART1 */
+#endif
}
/**
@@ -81,11 +81,11 @@ void uart_lld_start(UARTDriver *uartp) { if (uartp->state == UART_STOP) {
/* Enables the peripheral.*/
-#if PLATFORM_UART_USE_UART1
+#if PLATFORM_UART_USE_UART1 == TRUE
if (&UARTD1 == uartp) {
}
-#endif /* PLATFORM_UART_USE_UART1 */
+#endif
}
/* Configures the peripheral.*/
@@ -104,11 +104,11 @@ void uart_lld_stop(UARTDriver *uartp) { /* Resets the peripheral.*/
/* Disables the peripheral.*/
-#if PLATFORM_UART_USE_UART1
+#if PLATFORM_UART_USE_UART1 == TRUE
if (&UARTD1 == uartp) {
}
-#endif /* PLATFORM_UART_USE_UART1 */
+#endif
}
}
@@ -186,6 +186,6 @@ size_t uart_lld_stop_receive(UARTDriver *uartp) { return 0;
}
-#endif /* HAL_USE_UART */
+#endif /* HAL_USE_UART == TRUE */
/** @} */
|
