spi.c File Reference

Go to the source code of this file.

Functions

VDevice * spii_create (int addr, char *name, int rel_addr, void *data)
 
SPIIntr_T * spi_intr_new (int addr, char *name)
 
void spi_intr_construct (SPIIntr_T *spi, int addr, char *name)
 
void spi_intr_destroy (void *spi)
 
VDevice * spi_create (int addr, char *name, int rel_addr, void *data)
 
SPI_T * spi_new (int addr, char *name, int rel_addr)
 
void spi_construct (SPI_T *spi, int addr, char *name, int rel_addr)
 
void spi_destroy (void *spi)
 
uint8_t spi_port_rd (int addr)
 
void spi_port_wr (uint8_t val)
 

Detailed Description

Module to simulate the AVR's SPI module.

Definition in file spi.c.

Function Documentation

VDevice* spii_create ( int  addr,
char *  name,
int  rel_addr,
void *  data 
)

Allocate a new SPI interrupt.

Definition at line 78 of file spi.c.

References avr_new, class_overload_destroy(), spi_intr_construct(), and spi_intr_destroy().

void spi_intr_construct ( SPIIntr_T *  spi,
int  addr,
char *  name 
)

Constructor for spi interrupt object.

Definition at line 98 of file spi.c.

References avr_error, and vdev_construct().

Referenced by spii_create().

void spi_intr_destroy ( void *  spi)

Destructor for spi interrupt object.

Definition at line 134 of file spi.c.

References avr_core_async_cb_add(), avr_core_irq_raise(), avr_error, vdev_destroy(), and vdev_get_core().

Referenced by spii_create().

VDevice* spi_create ( int  addr,
char *  name,
int  rel_addr,
void *  data 
)

Allocate a new SPI structure.

Definition at line 247 of file spi.c.

References avr_new, class_overload_destroy(), spi_construct(), and spi_destroy().

void spi_construct ( SPI_T *  spi,
int  addr,
char *  name,
int  rel_addr 
)

Constructor for SPI object.

Definition at line 267 of file spi.c.

References avr_error, and vdev_construct().

Referenced by spi_create().

void spi_destroy ( void *  spi)

Destructor for SPI object.

Definition at line 300 of file spi.c.

References avr_core_clk_cb_add(), avr_core_get_vdev_by_addr(), avr_error, vdev_destroy(), and vdev_get_core().

Referenced by spi_create().


Automatically generated by Doxygen 1.8.11 on Mon Aug 8 2016.