SimAVR
AVR Simulator
|
Macros | |
#define | TWI_START 0x08 |
#define | TWI_REP_START 0x10 |
#define | TWI_ARB_LOST 0x38 |
#define | TWI_MTX_ADR_ACK 0x18 |
#define | TWI_MTX_ADR_NACK 0x20 |
#define | TWI_MTX_DATA_ACK 0x28 |
#define | TWI_MTX_DATA_NACK 0x30 |
#define | TWI_MRX_ADR_ACK 0x40 |
#define | TWI_MRX_ADR_NACK 0x48 |
#define | TWI_MRX_DATA_ACK 0x50 |
#define | TWI_MRX_DATA_NACK 0x58 |
#define | TWI_STX_ADR_ACK 0xA8 |
#define | TWI_STX_ADR_ACK_M_ARB_LOST 0xB0 |
#define | TWI_STX_DATA_ACK 0xB8 |
#define | TWI_STX_DATA_NACK 0xC0 |
#define | TWI_STX_DATA_ACK_LAST_BYTE 0xC8 |
#define | TWI_SRX_ADR_ACK 0x60 |
#define | TWI_SRX_ADR_ACK_M_ARB_LOST 0x68 |
#define | TWI_SRX_GEN_ACK 0x70 |
#define | TWI_SRX_GEN_ACK_M_ARB_LOST 0x78 |
#define | TWI_SRX_ADR_DATA_ACK 0x80 |
#define | TWI_SRX_ADR_DATA_NACK 0x88 |
#define | TWI_SRX_GEN_DATA_ACK 0x90 |
#define | TWI_SRX_GEN_DATA_NACK 0x98 |
#define | TWI_SRX_STOP_RESTART 0xA0 |
#define | TWI_NO_STATE 0xF8 |
#define | TWI_BUS_ERROR 0x00 |
#define | AVR_TWI_DEBUG 1 |
Functions | |
static void | _avr_twi_status_set (avr_twi_t *p, uint8_t v, int interrupt) |
static | __attribute__ ((unused)) |
static avr_cycle_count_t | avr_twi_set_state_timer (struct avr_t *avr, avr_cycle_count_t when, void *param) |
static void | _avr_twi_delay_state (avr_twi_t *p, int twi_cycles, uint8_t state) |
static void | avr_twi_write (struct avr_t *avr, avr_io_addr_t addr, uint8_t v, void *param) |
static void | avr_twi_write_data (struct avr_t *avr, avr_io_addr_t addr, uint8_t v, void *param) |
static uint8_t | avr_twi_read_data (struct avr_t *avr, avr_io_addr_t addr, void *param) |
static void | avr_twi_write_status (struct avr_t *avr, avr_io_addr_t addr, uint8_t v, void *param) |
static void | avr_twi_irq_input (struct avr_irq_t *irq, uint32_t value, void *param) |
void | avr_twi_reset (struct avr_io_t *io) |
void | avr_twi_init (avr_t *avr, avr_twi_t *p) |
uint32_t | avr_twi_irq_msg (uint8_t msg, uint8_t addr, uint8_t data) |
Create a message value for twi including the 'msg' bitfield, 'addr' and data. More... | |
Variables | |
static const char * | irq_names [TWI_IRQ_COUNT] |
static avr_io_t | _io |
#define AVR_TWI_DEBUG 1 |
#define TWI_ARB_LOST 0x38 |
#define TWI_BUS_ERROR 0x00 |
#define TWI_MRX_ADR_ACK 0x40 |
#define TWI_MRX_ADR_NACK 0x48 |
#define TWI_MRX_DATA_ACK 0x50 |
#define TWI_MRX_DATA_NACK 0x58 |
#define TWI_MTX_ADR_ACK 0x18 |
#define TWI_MTX_ADR_NACK 0x20 |
#define TWI_MTX_DATA_ACK 0x28 |
#define TWI_MTX_DATA_NACK 0x30 |
#define TWI_NO_STATE 0xF8 |
#define TWI_REP_START 0x10 |
#define TWI_SRX_ADR_ACK 0x60 |
#define TWI_SRX_ADR_ACK_M_ARB_LOST 0x68 |
#define TWI_SRX_ADR_DATA_ACK 0x80 |
#define TWI_SRX_ADR_DATA_NACK 0x88 |
#define TWI_SRX_GEN_ACK 0x70 |
#define TWI_SRX_GEN_ACK_M_ARB_LOST 0x78 |
#define TWI_SRX_GEN_DATA_ACK 0x90 |
#define TWI_SRX_GEN_DATA_NACK 0x98 |
#define TWI_SRX_STOP_RESTART 0xA0 |
#define TWI_START 0x08 |
#define TWI_STX_ADR_ACK 0xA8 |
#define TWI_STX_ADR_ACK_M_ARB_LOST 0xB0 |
#define TWI_STX_DATA_ACK 0xB8 |
#define TWI_STX_DATA_ACK_LAST_BYTE 0xC8 |
#define TWI_STX_DATA_NACK 0xC0 |
|
static |
|
static |
|
inlinestatic |
|
static |
|
static |
void avr_twi_reset | ( | struct avr_io_t * | io | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |