Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: STM32L452_Nucleo_ticker
Fork of mbed-dev by
Diff: targets/TARGET_STM/can_api.c
- Revision:
- 172:7d866c31b3c5
- Parent:
- 170:19eb464bc2be
- Child:
- 174:b96e65c34a4d
diff -r 89b338f31ef1 -r 7d866c31b3c5 targets/TARGET_STM/can_api.c
--- a/targets/TARGET_STM/can_api.c Wed Aug 16 18:27:13 2017 +0100
+++ b/targets/TARGET_STM/can_api.c Thu Aug 31 17:27:04 2017 +0100
@@ -180,10 +180,10 @@
}
if (hit) {
- btr = ((timing_pts[bits][1] << 20) & 0x00700000)
- | ((timing_pts[bits][0] << 16) & 0x000F0000)
- | ((psjw << 24) & 0x0000C000)
- | ((brp << 0) & 0x000003FF);
+ btr = ((timing_pts[bits][1] << CAN_BTR_TS2_Pos) & CAN_BTR_TS2) |
+ ((timing_pts[bits][0] << CAN_BTR_TS1_Pos) & CAN_BTR_TS1) |
+ ((psjw << CAN_BTR_SJW_Pos) & CAN_BTR_SJW) |
+ ((brp << CAN_BTR_BRP_Pos) & CAN_BTR_BRP);
} else {
btr = 0xFFFFFFFF;
}
