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

Go to the source code of this file.

Data Structures

struct  avr_ioport_getirq_t
 this ioctl takes a avr_regbit_t, compares the register address to PORT/PIN/DDR and return the corresponding IRQ(s) if it matches More...
 
struct  avr_ioport_state_t
 ioctl used to get a port state. More...
 
struct  avr_ioport_external_t
 ioctl used to set default port state when set as input. More...
 
struct  avr_iopin_t
 pin structure More...
 
struct  avr_ioport_t
 Definition for an IO port. More...
 

Macros

#define AVR_IOPORT_OUTPUT   0x100
 
#define AVR_IOCTL_IOPORT_GETIRQ(_name)   AVR_IOCTL_DEF('i','o','g',(_name))
 add port name (uppercase) to get the real IRQ More...
 
#define AVR_IOCTL_IOPORT_GETIRQ_REGBIT   AVR_IOCTL_DEF('i','o','g','r')
 
#define AVR_IOCTL_IOPORT_GETSTATE(_name)   AVR_IOCTL_DEF('i','o','s',(_name))
 add port name (uppercase) to get the port state More...
 
#define AVR_IOCTL_IOPORT_SET_EXTERNAL(_name)   AVR_IOCTL_DEF('i','o','p',(_name))
 add port name (uppercase) to set default input pin IRQ values More...
 
#define AVR_IOPIN(_port, _pin)   { .port = _port, .pin = _pin }
 
#define AVR_IOPORT_DECLARE(_lname, _cname, _uname)
 

Typedefs

typedef struct avr_ioport_getirq_t avr_ioport_getirq_t
 this ioctl takes a avr_regbit_t, compares the register address to PORT/PIN/DDR and return the corresponding IRQ(s) if it matches More...
 
typedef struct avr_ioport_state_t avr_ioport_state_t
 ioctl used to get a port state. More...
 
typedef struct avr_ioport_external_t avr_ioport_external_t
 ioctl used to set default port state when set as input. More...
 
typedef struct avr_iopin_t avr_iopin_t
 pin structure More...
 
typedef struct avr_ioport_t avr_ioport_t
 Definition for an IO port. More...
 

Enumerations

enum  {
  IOPORT_IRQ_PIN0 = 0, IOPORT_IRQ_PIN1, IOPORT_IRQ_PIN2, IOPORT_IRQ_PIN3,
  IOPORT_IRQ_PIN4, IOPORT_IRQ_PIN5, IOPORT_IRQ_PIN6, IOPORT_IRQ_PIN7,
  IOPORT_IRQ_PIN_ALL, IOPORT_IRQ_DIRECTION_ALL, IOPORT_IRQ_REG_PORT, IOPORT_IRQ_REG_PIN,
  IOPORT_IRQ_COUNT
}
 

Functions

void avr_ioport_init (avr_t *avr, avr_ioport_t *port)