SimAVR
AVR Simulator
TWI

Data Structures

struct  avr_twi_msg_t
 
struct  avr_twi_msg_irq_t
 
struct  avr_twi_t
 

Macros

#define AVR_IOCTL_TWI_GETIRQ(_name)   AVR_IOCTL_DEF('t','w','i',(_name))
 add port number to get the real IRQ More...
 

Typedefs

typedef struct avr_twi_msg_t avr_twi_msg_t
 
typedef struct avr_twi_msg_irq_t avr_twi_msg_irq_t
 
typedef struct avr_twi_t avr_twi_t
 

Enumerations

enum  { TWI_IRQ_INPUT = 0, TWI_IRQ_OUTPUT, TWI_IRQ_STATUS, TWI_IRQ_COUNT }
 
enum  {
  TWI_COND_START = (1 << 0), TWI_COND_STOP = (1 << 1), TWI_COND_ADDR = (1 << 2), TWI_COND_ACK = (1 << 3),
  TWI_COND_WRITE = (1 << 4), TWI_COND_READ = (1 << 5), TWI_COND_SLAVE = (1 << 6)
}
 

Functions

void avr_twi_init (avr_t *avr, avr_twi_t *port)
 
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...
 

Detailed Description

Macro Definition Documentation

#define AVR_IOCTL_TWI_GETIRQ (   _name)    AVR_IOCTL_DEF('t','w','i',(_name))

add port number to get the real IRQ

Typedef Documentation

typedef struct avr_twi_msg_t avr_twi_msg_t
typedef struct avr_twi_t avr_twi_t

Enumeration Type Documentation

anonymous enum
Enumerator
TWI_IRQ_INPUT 
TWI_IRQ_OUTPUT 
TWI_IRQ_STATUS 
TWI_IRQ_COUNT 
anonymous enum
Enumerator
TWI_COND_START 
TWI_COND_STOP 
TWI_COND_ADDR 
TWI_COND_ACK 
TWI_COND_WRITE 
TWI_COND_READ 
TWI_COND_SLAVE 

internal state, do not use in irq messages

Function Documentation

void avr_twi_init ( avr_t avr,
avr_twi_t port 
)

Here is the call graph for this function:

Here is the caller graph for this function:

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.

This value is what is sent as the IRQ value

Here is the caller graph for this function: