Multiple frames implementation (#2)
* Add rx event handlers * Fix compile errors and add constness * Pass sender id * Change api interface * Revert changes * Add filter fifo * Add default setup * Add receive function * Remove interrupt activation * Activate RX interrupts * Merge remote changes * Add event list constructor * Fix compilation bug * Send and receive multiple frames * Refactor * Refactor * Fix compile error * Use known syntax * Refactor * Provide storage * Add frame end * Add some documentation * Turn macros into functions * Refactor * Refactor * Fix compile error * Use ExtendedIds Co-authored-by: Riccardo998 <riccardo.storchi98@gmail.com>
This commit is contained in:
committed by
GitHub
parent
90d1836dfa
commit
7b09401b00
@@ -2,21 +2,19 @@
|
||||
#define INC_MMR_CAN_EVENTS_H_
|
||||
|
||||
#include "mmr_can.h"
|
||||
#include "mmr_can_util.h"
|
||||
|
||||
typedef struct {
|
||||
CanId senderId;
|
||||
uint8_t *message;
|
||||
} MmrCanEvent;
|
||||
|
||||
typedef void (*MmrCanEventHandler)(MmrCanEvent *event);
|
||||
typedef void (*MmrCanEventHandler)(const MmrCanMessage *event);
|
||||
|
||||
typedef struct {
|
||||
const MmrCanEventHandler *handlers;
|
||||
const size_t count;
|
||||
} MmrCanEventList;
|
||||
|
||||
#define MMR_CAN_CreateEventList(handlers) \
|
||||
(const MmrCanEventList) { handlers, sizeofarray(handlers) }
|
||||
|
||||
void MMR_CAN_InitRxHandlers(const MmrCanEventList *rxEvents);
|
||||
HalStatus MMR_CAN_InitRxHandlers(CanHandle *hcan, const MmrCanEventList *rxEvents);
|
||||
|
||||
|
||||
#endif /* INC_MMR_CAN_EVENTS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user