18 lines
348 B
C
18 lines
348 B
C
#ifndef I3C_H
|
|
#define I3C_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <stdbool.h>
|
|
|
|
#define I3C_ADDR_SIZE 1
|
|
#define I3C_PL_LEN_SIZE 1
|
|
#define I3C_CRC_SIZE 1
|
|
|
|
#define I3C_HEADER_SIZE (I3C_ADDR_SIZE + I3C_PL_LEN_SIZE + I3C_CRC_SIZE)
|
|
|
|
uint8_t i3c_crc(uint8_t dst, uint8_t *msg, size_t len);
|
|
bool i3c_validate(uint8_t *msg, size_t len);
|
|
|
|
#endif
|