29typedef volatile struct __attribute__((packed,aligned(4))) {
35#define NEORV32_TWI ((neorv32_twi_t*) (NEORV32_TWI_BASE))
71#define TWI_CMD_NOP (0b00)
72#define TWI_CMD_START (0b01)
73#define TWI_CMD_STOP (0b10)
74#define TWI_CMD_RTX (0b11)
void neorv32_twi_enable(void)
Definition neorv32_twi.c:81
void neorv32_twi_send_nonblocking(uint8_t data, int mack)
Definition neorv32_twi.c:182
int neorv32_twi_get_fifo_depth(void)
Definition neorv32_twi.c:62
NEORV32_TWI_DCMD_enum
Definition neorv32_twi.h:58
@ TWI_DCMD_CMD_LO
Definition neorv32_twi.h:62
@ TWI_DCMD_MSB
Definition neorv32_twi.h:60
@ TWI_DCMD_CMD_HI
Definition neorv32_twi.h:63
@ TWI_DCMD_LSB
Definition neorv32_twi.h:59
@ TWI_DCMD_ACK
Definition neorv32_twi.h:61
int neorv32_twi_busy(void)
Definition neorv32_twi.c:92
void neorv32_twi_generate_start(void)
Definition neorv32_twi.c:166
NEORV32_TWI_CTRL_enum
Definition neorv32_twi.h:38
@ TWI_CTRL_FIFO_MSB
Definition neorv32_twi.h:50
@ TWI_CTRL_EN
Definition neorv32_twi.h:39
@ TWI_CTRL_BUSY
Definition neorv32_twi.h:54
@ TWI_CTRL_CDIV1
Definition neorv32_twi.h:44
@ TWI_CTRL_PRSC2
Definition neorv32_twi.h:42
@ TWI_CTRL_FIFO_LSB
Definition neorv32_twi.h:49
@ TWI_CTRL_CDIV0
Definition neorv32_twi.h:43
@ TWI_CTRL_PRSC1
Definition neorv32_twi.h:41
@ TWI_CTRL_PRSC0
Definition neorv32_twi.h:40
@ TWI_CTRL_CDIV3
Definition neorv32_twi.h:46
@ TWI_CTRL_TX_FULL
Definition neorv32_twi.h:52
@ TWI_CTRL_CDIV2
Definition neorv32_twi.h:45
@ TWI_CTRL_CLKSTR
Definition neorv32_twi.h:47
@ TWI_CTRL_RX_AVAIL
Definition neorv32_twi.h:53
int neorv32_twi_get(uint8_t *data)
Definition neorv32_twi.c:109
void neorv32_twi_setup(int prsc, int cdiv, int clkstr)
Definition neorv32_twi.c:44
void neorv32_twi_generate_stop_nonblocking(void)
Definition neorv32_twi.c:196
int neorv32_twi_available(void)
Definition neorv32_twi.c:26
int neorv32_twi_trans(uint8_t *data, int mack)
Definition neorv32_twi.c:130
void neorv32_twi_generate_stop(void)
Definition neorv32_twi.c:153
void neorv32_twi_generate_start_nonblocking(void)
Definition neorv32_twi.c:207
void neorv32_twi_disable(void)
Definition neorv32_twi.c:72
Definition neorv32_twi.h:29
uint32_t CTRL
Definition neorv32_twi.h:30
uint32_t DCMD
Definition neorv32_twi.h:31