29typedef volatile struct __attribute__((packed,aligned(4))) {
35#define NEORV32_TWI ((neorv32_twi_t*) (NEORV32_TWI_BASE))
74#define TWI_CMD_NOP (0b00)
75#define TWI_CMD_START (0b01)
76#define TWI_CMD_STOP (0b10)
77#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:214
int neorv32_twi_get_fifo_depth(void)
Definition neorv32_twi.c:62
NEORV32_TWI_DCMD_enum
Definition neorv32_twi.h:60
@ TWI_DCMD_CMD_LO
Definition neorv32_twi.h:64
@ TWI_DCMD_MSB
Definition neorv32_twi.h:62
@ TWI_DCMD_CMD_HI
Definition neorv32_twi.h:65
@ TWI_DCMD_LSB
Definition neorv32_twi.h:61
@ TWI_DCMD_ACK
Definition neorv32_twi.h:63
int neorv32_twi_busy(void)
Definition neorv32_twi.c:124
void neorv32_twi_generate_start(void)
Definition neorv32_twi.c:198
int neorv32_twi_sense_scl(void)
Definition neorv32_twi.c:92
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:56
@ TWI_CTRL_CDIV1
Definition neorv32_twi.h:44
@ TWI_CTRL_PRSC2
Definition neorv32_twi.h:42
@ TWI_CTRL_SENSE_SCL
Definition neorv32_twi.h:52
@ 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:54
@ TWI_CTRL_CDIV2
Definition neorv32_twi.h:45
@ TWI_CTRL_CLKSTR
Definition neorv32_twi.h:47
@ TWI_CTRL_RX_AVAIL
Definition neorv32_twi.h:55
@ TWI_CTRL_SENSE_SDA
Definition neorv32_twi.h:53
int neorv32_twi_sense_sda(void)
Definition neorv32_twi.c:108
int neorv32_twi_get(uint8_t *data)
Definition neorv32_twi.c:141
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:228
int neorv32_twi_available(void)
Definition neorv32_twi.c:26
int neorv32_twi_trans(uint8_t *data, int mack)
Definition neorv32_twi.c:162
void neorv32_twi_generate_stop(void)
Definition neorv32_twi.c:185
void neorv32_twi_generate_start_nonblocking(void)
Definition neorv32_twi.c:239
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