Add event handlers (#1)
* Add rx event handlers * Fix compile errors and add constness * Pass sender id * Change api interface * Revert changes * Add filter fifo
This commit is contained in:
committed by
GitHub
parent
503b333478
commit
90d1836dfa
@@ -0,0 +1,22 @@
|
||||
#ifndef INC_MMR_CAN_EVENTS_H_
|
||||
#define INC_MMR_CAN_EVENTS_H_
|
||||
|
||||
#include "mmr_can.h"
|
||||
|
||||
typedef struct {
|
||||
CanId senderId;
|
||||
uint8_t *message;
|
||||
} MmrCanEvent;
|
||||
|
||||
typedef void (*MmrCanEventHandler)(MmrCanEvent *event);
|
||||
|
||||
typedef struct {
|
||||
const MmrCanEventHandler *handlers;
|
||||
const size_t count;
|
||||
} MmrCanEventList;
|
||||
|
||||
|
||||
void MMR_CAN_InitRxHandlers(const MmrCanEventList *rxEvents);
|
||||
|
||||
|
||||
#endif /* INC_MMR_CAN_EVENTS_H_ */
|
||||
Reference in New Issue
Block a user