SimAVR
AVR Simulator
sim_io.h File Reference
#include "sim_avr.h"
Include dependency graph for sim_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  avr_io_t
 IO module base struct Modules uses that as their first member in their own struct. More...
 

Macros

#define AVR_IOCTL_DEF(_a, _b, _c, _d)   (((_a) << 24)|((_b) << 16)|((_c) << 8)|((_d)))
 Used by the ioports to implement their own features see avr_eeprom. More...
 
#define AVR_IOMEM_IRQ_ALL   8
 

Typedefs

typedef struct avr_io_t avr_io_t
 IO module base struct Modules uses that as their first member in their own struct. More...
 

Functions

void avr_register_io (avr_t *avr, avr_io_t *io)
 Registers an IO module, so it's run(), reset() etc are called. More...
 
avr_irq_tavr_io_setirqs (avr_io_t *io, uint32_t ctl, int count, avr_irq_t *irqs)
 Sets an IO module "official" IRQs and the ioctl used to get to them. More...
 
void avr_register_io_read (avr_t *avr, avr_io_addr_t addr, avr_io_read_t read, void *param)
 Register a callback for when IO register "addr" is read. More...
 
void avr_register_io_write (avr_t *avr, avr_io_addr_t addr, avr_io_write_t write, void *param)
 Register a callback for when the IO register is written. callback has to set the memory itself. More...
 
int avr_ioctl (avr_t *avr, uint32_t ctl, void *io_param)
 Call every IO modules until one responds to this. More...
 
struct avr_irq_tavr_io_getirq (avr_t *avr, uint32_t ctl, int index)
 Get the specific irq for a module, check AVR_IOCTL_IOPORT_GETIRQ for example. More...
 
avr_irq_tavr_iomem_getirq (avr_t *avr, avr_io_addr_t addr, const char *name, int index)
 Get the IRQ for an absolute IO address. More...
 
void avr_deallocate_ios (avr_t *avr)
 Terminates all IOs and remove from them from the io chain. More...