aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/can_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/templates/can_lld.c')
-rw-r--r--os/hal/templates/can_lld.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/os/hal/templates/can_lld.c b/os/hal/templates/can_lld.c
index 27fc5e79f..f276c4271 100644
--- a/os/hal/templates/can_lld.c
+++ b/os/hal/templates/can_lld.c
@@ -24,7 +24,7 @@
#include "hal.h"
-#if HAL_USE_CAN || defined(__DOXYGEN__)
+#if (HAL_USE_CAN == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -37,7 +37,7 @@
/**
* @brief CAN1 driver identifier.
*/
-#if PLATFORM_CAN_USE_CAN1 || defined(__DOXYGEN__)
+#if (PLATFORM_CAN_USE_CAN1 == TRUE) || defined(__DOXYGEN__)
CANDriver CAND1;
#endif
@@ -64,10 +64,10 @@ CANDriver CAND1;
*/
void can_lld_init(void) {
-#if PLATFORM_CAN_USE_CAN1
+#if PLATFORM_CAN_USE_CAN1 == TRUE
/* Driver initialization.*/
canObjectInit(&CAND1);
-#endif /* PLATFORM_CAN_USE_CAN1 */
+#endif
}
/**
@@ -81,11 +81,11 @@ void can_lld_start(CANDriver *canp) {
if (canp->state == CAN_STOP) {
/* Enables the peripheral.*/
-#if PLATFORM_CAN_USE_CAN1
+#if PLATFORM_CAN_USE_CAN1 == TRUE
if (&CAND1 == canp) {
}
-#endif /* PLATFORM_CAN_USE_CAN1 */
+#endif
}
/* Configures the peripheral.*/
@@ -104,11 +104,11 @@ void can_lld_stop(CANDriver *canp) {
/* Resets the peripheral.*/
/* Disables the peripheral.*/
-#if PLATFORM_CAN_USE_CAN1
+#if PLATFORM_CAN_USE_CAN1 == TRUE
if (&CAND1 == canp) {
}
-#endif /* PLATFORM_CAN_USE_CAN1 */
+#endif
}
}
@@ -130,15 +130,15 @@ bool can_lld_is_tx_empty(CANDriver *canp, canmbx_t mailbox) {
switch (mailbox) {
case CAN_ANY_MAILBOX:
- return FALSE;
+ return false;
case 1:
- return FALSE;
+ return false;
case 2:
- return FALSE;
+ return false;
case 3:
- return FALSE;
+ return false;
default:
- return FALSE;
+ return false;
}
}
@@ -180,13 +180,13 @@ bool can_lld_is_rx_nonempty(CANDriver *canp, canmbx_t mailbox) {
switch (mailbox) {
case CAN_ANY_MAILBOX:
- return FALSE;
+ return false;
case 1:
- return FALSE;
+ return false;
case 2:
- return FALSE;
+ return false;
default:
- return FALSE;
+ return false;
}
}
@@ -209,7 +209,7 @@ void can_lld_receive(CANDriver *canp,
}
-#if CAN_USE_SLEEP_MODE || defined(__DOXYGEN__)
+#if (CAN_USE_SLEEP_MODE == TRUE) || defined(__DOXYGEN__)
/**
* @brief Enters the sleep mode.
*
@@ -235,8 +235,8 @@ void can_lld_wakeup(CANDriver *canp) {
(void)canp;
}
-#endif /* CAN_USE_SLEEP_MODE */
+#endif /* CAN_USE_SLEEP_MOD == TRUEE */
-#endif /* HAL_USE_CAN */
+#endif /* HAL_USE_CAN == TRUE */
/** @} */