117 history_[
head_] = event;
118 head_ = (head_ + 1) % 60;
120 void clear() { memset(history_, 0,
sizeof(history_)); }
138 void (*callback)(uint8_t) =
nullptr,
139 bool blocking =
false);
140 int8_t
write(uint8_t addr, uint8_t reg, uint8_t data,
void (*callback)(uint8_t),
bool blocking =
false);
142 int8_t
write(uint8_t addr, uint8_t reg, uint8_t data);
143 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)