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.
Fork of mbed-dev by
Revision 151:91825d030f9b, committed 2016-11-14
- Comitter:
- DangerousElectrician
- Date:
- Mon Nov 14 04:39:23 2016 +0000
- Parent:
- 150:02e0a0aed4ec
- Commit message:
- stuff changed?
Changed in this revision
targets/TARGET_STM/TARGET_STM32F0/can_api.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/targets/TARGET_STM/TARGET_STM32F0/can_api.c Tue Nov 08 17:45:16 2016 +0000 +++ b/targets/TARGET_STM/TARGET_STM32F0/can_api.c Mon Nov 14 04:39:23 2016 +0000 @@ -234,6 +234,10 @@ //handle is the FIFO number CAN_TypeDef *can = (CAN_TypeDef *)(obj->can); + + if ((uint8_t)(can->RF0R & CAN_RF0R_FMP0) == (uint8_t)0) { // no messages in fifo + return 0; + } /* Get the Id */ msg->format = (CANFormat)((uint8_t)0x04 & can->sFIFOMailBox[handle].RIR); @@ -266,7 +270,6 @@ /* Release FIFO1 */ can->RF1R = CAN_RF1R_RFOM1; } - return 1; }