Create scs dict

This commit is contained in:
Stefano Calabretti
2022-02-03 18:55:52 +01:00
parent d22f9539b3
commit f7b5c0315e
2 changed files with 57 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#ifndef INC_MMR_CAN_SCS_H_
#define INC_MMR_CAN_SCS_H_
#ifndef MMR_CAN_SCS_DICTIONARY_SIZE
#define MMR_CAN_SCS_DICTIONARY_SIZE 5
#endif
#include <stdint.h>
#include "mmr_can.h"
typedef struct {
uint32_t key;
uint32_t delayStart;
} MmrCanScsDictEntry;
typedef MmrCanScsDictEntry MmrCanScsDictionary[MMR_SCS_DICTIONARY_SIZE];
typedef void(*MmrCanScsDictAction)(MmrCanScsDictEntry *entry);
uint32_t MMR_CAN_ScsDictPut(MmrCanScsDictEntry entry);
void MMR_CAN_ScsDictRemove(uint32_t key);
void MMR_CAN_ScsDictForeach(MmrCanScsDictAction action);
uint32_t MMR_CAN_ScsGetKey(MmrCanMessage *message);
#endif // !INC_MMR_CAN_SCS_H_