Commit Graph

4 Commits (master)

Author SHA1 Message Date
Hari Limaye b493a15a53 CAN: Use uintptr_t for can_irq_ids
The HAL can_api stores an array of IDs in order to dispatch interrupts
to the correct CAN object. The drivers level CAN Class casts a pointer
to itself to an uint32_t, which is stored as the ID and then cast back
to a CAN * in order to call the correct handler. This results in
compilation failure when the size of an object pointer is greater than
uint32_t, for example when building on a PC for unit testing.

In order to allow Unit Testing of the CAN Class, we replace the use of
uint32_t with uintptr_t (type capable of holding a pointer), which
allows portability and expresses intentions more clearly. In aid of this
latter goal, we also replace the use of the name "id" with "context",
to improve clarity. These are addresses of the context related to that
callback.
2021-09-17 13:36:43 +01:00
Jan Jongboom 49e970560d GigaDevice targets can return ninitialized variable in CAN driver 2019-03-07 16:41:42 +01:00
Russ Butler 7e8695a2c5 Add HAL API for can pinmap
Add the functions can_rd_pinmap and can_td_pinmap to all targets.
2019-02-08 09:10:10 -06:00
c_jin 5a1108e742 Add GD32_F450ZI as new target 2019-01-09 19:03:33 +08:00