90d1836dfa
* Add rx event handlers * Fix compile errors and add constness * Pass sender id * Change api interface * Revert changes * Add filter fifo
18 lines
389 B
C
18 lines
389 B
C
#ifndef INC_MMR_CAN_UTIL_H_
|
|
#define INC_MMR_CAN_UTIL_H_
|
|
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
|
|
#define arrayLength(array) \
|
|
(sizeof(array) / sizeof(*(array)))
|
|
|
|
#define stringArrayLength(array) \
|
|
stringBufferLength((array), sizeof(array))
|
|
|
|
size_t stringBufferLength(uint8_t *buffer, size_t maxLen) {
|
|
return strnlen((const char*)buffer, maxLen);
|
|
}
|
|
|
|
#endif /* INC_MMR_CAN_UTIL_H_ */
|