120 history_[
head_] = event;
121 head_ = (head_ + 1) % 60;
125 memset(history_, 0,
sizeof(history_));
139 int8_t
read(uint8_t
addr, uint8_t
reg, uint8_t num_bytes, uint8_t *data,
void(*callback)(uint8_t) =
nullptr,
140 bool blocking =
false);
141 int8_t
write(uint8_t addr, uint8_t reg, uint8_t data,
void(*callback)(uint8_t),
bool blocking =
false);
143 int8_t
write(uint8_t addr, uint8_t reg, uint8_t data);
144 int8_t
read(uint8_t addr, uint8_t reg, uint8_t *data);
void transfer_complete_cb()
Debug_History event_history_
DMA Init structure definition.
Debug_History interrupt_history_
void init(const i2c_hardware_struct_t *c)
void add_event(uint32_t event)
DMA_InitTypeDef DMA_InitStructure_
volatile current_status_t current_status_
static volatile uint8_t addr
void handle_hardware_failure()
static volatile uint8_t reg
int8_t write(uint8_t addr, uint8_t reg, uint8_t data, void(*callback)(uint8_t), bool blocking=false)
volatile uint8_t return_code_
const i2c_hardware_struct_t * c_
int8_t read(uint8_t addr, uint8_t reg, uint8_t num_bytes, uint8_t *data, void(*callback)(uint8_t)=nullptr, bool blocking=false)