|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
A device on the modelled I2C bus: 7-bit address + read/write callbacks. More...
Data Fields | |
| bool | present |
| Slot occupied. | |
| uint8_t | addr_7b |
| 7-bit address. | |
| void(* | write )(void *ctx, uint8_t byte) |
| Controller->device. | |
| uint32_t(* | read )(void *ctx, uint8_t *buf, uint32_t max) |
| Device->controller. | |
| void(* | stop )(void *ctx) |
| STOP/transfer end. | |
| void * | ctx |
| Device state. | |
A device on the modelled I2C bus: 7-bit address + read/write callbacks.
The write callback receives each byte the controller transmits after the address (register pointers, then payload). The read callback fills buf with up to max response bytes for the device's current state and returns the count; the bus model serves them to the controller one NTDTBP0 read at a time. present false means no device answers that address (the bus NACKs).
Definition at line 255 of file board_periph_i2c.c.
| uint8_t i2c_device_t::addr_7b |
7-bit address.
Definition at line 257 of file board_periph_i2c.c.
| void* i2c_device_t::ctx |
Device state.
Definition at line 261 of file board_periph_i2c.c.
Referenced by internal_i3c_address_phase(), internal_i3c_close_transfer(), and internal_i3c_ntdtbp0_write().
| bool i2c_device_t::present |
Slot occupied.
Definition at line 256 of file board_periph_i2c.c.
| uint32_t(* i2c_device_t::read) (void *ctx, uint8_t *buf, uint32_t max) |
Device->controller.
Definition at line 259 of file board_periph_i2c.c.
Referenced by internal_i3c_address_phase().
| void(* i2c_device_t::stop) (void *ctx) |
STOP/transfer end.
Definition at line 260 of file board_periph_i2c.c.
Referenced by internal_i3c_close_transfer().
| void(* i2c_device_t::write) (void *ctx, uint8_t byte) |
Controller->device.
Definition at line 258 of file board_periph_i2c.c.
Referenced by internal_i3c_ntdtbp0_write().