This repository has been archived on 2026-02-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
can/Inc/mmr_can_events.h
T
Stefano Calabretti 4d5c1934a4 Scs (#3)
* Add send scs

* Create scs dict

* Fix compilation errors

* Fix compile error

* Change default include

* Add Timer SCS manager

* Remove unused files

* Fix bugs

* Add documentation

* Add SCS manager

bozza

* Refactor

* Use same naming convention

* Add tick provider

* Update header

* Fix header bit translation

* Test HandleNext OK

* Remove linting

* Remove indents

* Add documentation

* Improve docs

* Remove pointer

* Remove mailbox

* Remove useless comment

* Add newline

* Fix compile errors

* Separate scs entries from manager

* Refactor

* Fix include guards

Co-authored-by: nicolagutierrez <nicolagutierrez.ng@gmail.com>
2022-02-23 21:08:47 +01:00

40 lines
905 B
C

/**
* @file mmr_can_events.h
* @brief
* This header provides a set of utilities for working
* with interrupts.
*
* The recommended way of readings the CAN bus is
* via polling, altought interrupt may be used for
* monitoring critical messages.
*/
#ifndef INC_MMR_CAN_EVENTS_H_
#define INC_MMR_CAN_EVENTS_H_
#include "mmr_can.h"
#include "mmr_can_util.h"
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) }
/**
* @brief
* Activates the CAN rx interrupts
*
* When one is fired, the callbacks provided inside the
* MmrCanEventList will be invoked
*/
HalStatus MMR_CAN_InitRxHandlers(CanHandle *hcan, const MmrCanEventList *rxEvents);
#endif /* INC_MMR_CAN_EVENTS_H_ */