diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-01-07 18:10:34 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-01-07 18:10:34 +0000 |
commit | 9b18fecebf4ab1065ec593d0a59d34ed5a5dc8b5 (patch) | |
tree | 019e1bc9307756ac6de22c5eeefde4e055c2238b /os/hal/ports/STM32/LLD | |
parent | 6a0f53a89edfe4fa64198ba196e5e9a9b27bfba9 (diff) | |
download | ChibiOS-9b18fecebf4ab1065ec593d0a59d34ed5a5dc8b5.tar.gz ChibiOS-9b18fecebf4ab1065ec593d0a59d34ed5a5dc8b5.tar.bz2 ChibiOS-9b18fecebf4ab1065ec593d0a59d34ed5a5dc8b5.zip |
Fixed redundat assertion in STM32 CAN driver. Fixed some spacing issues.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10021 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD')
-rw-r--r-- | os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c b/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c index c28613a03..309a32f31 100644 --- a/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c +++ b/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c @@ -80,6 +80,7 @@ static void can_lld_set_filters(CANDriver* canp, uint32_t can2sb,
uint32_t num,
const CANFilter *cfp) {
+
#if STM32_CAN_USE_CAN2
if(canp == &CAND2) {
/* Set handle to CAN1, because CAN1 manages the filters of CAN2.*/
@@ -96,6 +97,7 @@ static void can_lld_set_filters(CANDriver* canp, canp->can->FMR = (canp->can->FMR & 0xFFFF0000) | (can2sb << 8) | CAN_FMR_FINIT;
}
#endif
+
#if STM32_CAN_USE_CAN3
if(canp == &CAND3) {
rccEnableCAN3(FALSE);
@@ -121,6 +123,7 @@ static void can_lld_set_filters(CANDriver* canp, }
}
#endif
+
#if STM32_CAN_USE_CAN3
if(canp == &CAND3) {
for (i = 0; i < STM32_CAN3_MAX_FILTERS; i++) {
@@ -129,6 +132,7 @@ static void can_lld_set_filters(CANDriver* canp, }
}
#endif
+
/* Scanning the filters array.*/
for (i = 0; i < num; i++) {
fmask = 1 << cfp->filter;
@@ -1013,7 +1017,7 @@ void can_lld_wakeup(CANDriver *canp) { void canSTM32SetFilters(CANDriver *canp, uint32_t can2sb, uint32_t num, const CANFilter *cfp) {
#if STM32_CAN_USE_CAN2
- osalDbgCheck((can2sb >= 0) && (can2sb <= STM32_CAN_MAX_FILTERS) &&
+ osalDbgCheck((can2sb <= STM32_CAN_MAX_FILTERS) &&
(num <= STM32_CAN_MAX_FILTERS));
#endif
|