SimAVR
AVR Simulator
SPI

Data Structures

struct  avr_spi_t
 

Macros

#define AVR_IOCTL_SPI_GETIRQ(_name)   AVR_IOCTL_DEF('s','p','i',(_name))
 add port number to get the real IRQ More...
 
#define AVR_SPI_DECLARE(_prr, _prspi)
 

Typedefs

typedef struct avr_spi_t avr_spi_t
 

Enumerations

enum  { SPI_IRQ_INPUT = 0, SPI_IRQ_OUTPUT, SPI_IRQ_COUNT }
 

Functions

void avr_spi_init (avr_t *avr, avr_spi_t *port)
 

Detailed Description

Macro Definition Documentation

#define AVR_IOCTL_SPI_GETIRQ (   _name)    AVR_IOCTL_DEF('s','p','i',(_name))

add port number to get the real IRQ

#define AVR_SPI_DECLARE (   _prr,
  _prspi 
)
Value:
.spi = { \
.disabled = AVR_IO_REGBIT(_prr, _prspi), \
\
.r_spdr = SPDR, \
.r_spcr = SPCR, \
.r_spsr = SPSR, \
\
.spe = AVR_IO_REGBIT(SPCR, SPE), \
.mstr = AVR_IO_REGBIT(SPCR, MSTR), \
\
.spr = { AVR_IO_REGBIT(SPCR, SPR0), AVR_IO_REGBIT(SPCR, SPR1), AVR_IO_REGBIT(SPSR, SPI2X) }, \
.spi = { \
.enable = AVR_IO_REGBIT(SPCR, SPIE), \
.raised = AVR_IO_REGBIT(SPSR, SPIF), \
.vector = SPI_STC_vect, \
}, \
}
#define AVR_IO_REGBIT(_io, _bit)
Definition: sim_regbit.h:150

Typedef Documentation

typedef struct avr_spi_t avr_spi_t

Enumeration Type Documentation

anonymous enum
Enumerator
SPI_IRQ_INPUT 
SPI_IRQ_OUTPUT 
SPI_IRQ_COUNT 

Function Documentation

void avr_spi_init ( avr_t avr,
avr_spi_t port 
)

Here is the call graph for this function:

Here is the caller graph for this function: