Atmel Software Framework

xmega/ioport.h File Reference

XMEGA architecture specific IOPORT service implementation header file.

Copyright (c) 2012-2016 Atmel Corporation. All rights reserved.

Macros

#define IOPORT_BASE_ADDRESS   0x600
 
#define IOPORT_CREATE_PIN(port, pin)   ((IOPORT_ ## port) * 8 + (pin))
 Create IOPORT pin number. More...
 
#define IOPORT_PORT_OFFSET   0x20
 
IOPORT port numbers
#define IOPORT_PORTA   0
 
#define IOPORT_PORTB   1
 
#define IOPORT_PORTC   2
 
#define IOPORT_PORTD   3
 
#define IOPORT_PORTE   4
 
#define IOPORT_PORTR   15
 
IOPORT Mode bit definitions
#define IOPORT_MODE_TOTEM   (0x00 << 3)
 
#define IOPORT_MODE_BUSKEEPER   (0x01 << 3)
 
#define IOPORT_MODE_PULLDOWN   (0x02 << 3)
 
#define IOPORT_MODE_PULLUP   (0x03 << 3)
 
#define IOPORT_MODE_WIREDOR   (0x04 << 3)
 
#define IOPORT_MODE_WIREDAND   (0x05 << 3)
 
#define IOPORT_MODE_WIREDORPULL   (0x06 << 3)
 
#define IOPORT_MODE_WIREDANDPULL   (0x07 << 3)
 
#define IOPORT_MODE_INVERT_PIN   (0x01 << 6)
 
#define IOPORT_MODE_SLEW_RATE_LIMIT   (0x01 << 7)
 

Typedefs

typedef uint8_t ioport_mode_t
 
typedef uint8_t ioport_pin_t
 
typedef uint8_t ioport_port_mask_t
 
typedef uint8_t ioport_port_t
 

Functions

static __always_inline void arch_ioport_disable_pin (ioport_pin_t pin)
 
static __always_inline void arch_ioport_disable_port (ioport_port_t port, ioport_port_mask_t mask)
 
static __always_inline void arch_ioport_enable_pin (ioport_pin_t pin)
 
static __always_inline void arch_ioport_enable_port (ioport_port_t port, ioport_port_mask_t mask)
 
static __always_inline bool arch_ioport_get_pin_level (ioport_pin_t pin)
 
static __always_inline
ioport_port_mask_t 
arch_ioport_get_port_level (ioport_port_t port, ioport_port_mask_t mask)
 
static __always_inline void arch_ioport_init (void)
 
static __always_inline PORT_t * arch_ioport_pin_to_base (ioport_pin_t pin)
 
static __always_inline
ioport_port_mask_t 
arch_ioport_pin_to_index (ioport_pin_t pin)
 
static __always_inline
ioport_port_mask_t 
arch_ioport_pin_to_mask (ioport_pin_t pin)
 
static __always_inline
ioport_port_t 
arch_ioport_pin_to_port_id (ioport_pin_t pin)
 
static __always_inline PORT_t * arch_ioport_port_to_base (ioport_port_t port)
 
static __always_inline void arch_ioport_set_pin_dir (ioport_pin_t pin, enum ioport_direction dir)
 
static __always_inline void arch_ioport_set_pin_level (ioport_pin_t pin, bool level)
 
static __always_inline void arch_ioport_set_pin_mode (ioport_pin_t pin, ioport_mode_t mode)
 
static __always_inline void arch_ioport_set_pin_sense_mode (ioport_pin_t pin, enum ioport_sense pin_sense)
 
static __always_inline void arch_ioport_set_port_dir (ioport_port_t port, ioport_port_mask_t mask, enum ioport_direction dir)
 
static __always_inline void arch_ioport_set_port_level (ioport_port_t port, ioport_port_mask_t mask, enum ioport_value level)
 
static __always_inline void arch_ioport_set_port_mode (ioport_port_t port, ioport_port_mask_t mask, ioport_mode_t mode)
 
static __always_inline void arch_ioport_set_port_sense_mode (ioport_port_t port, ioport_port_mask_t mask, enum ioport_sense pin_sense)
 
static __always_inline void arch_ioport_toggle_pin_level (ioport_pin_t pin)
 
static __always_inline void arch_ioport_toggle_port_level (ioport_port_t port, ioport_port_mask_t mask)
 

#define IOPORT_BASE_ADDRESS   0x600
#define IOPORT_PORT_OFFSET   0x20
#define IOPORT_PORTA   0
#define IOPORT_PORTB   1
#define IOPORT_PORTC   2
#define IOPORT_PORTD   3
#define IOPORT_PORTE   4
#define IOPORT_PORTR   15

typedef uint8_t ioport_mode_t
typedef uint8_t ioport_pin_t
typedef uint8_t ioport_port_mask_t
typedef uint8_t ioport_port_t

static __always_inline void arch_ioport_disable_pin ( ioport_pin_t  pin)
static
static __always_inline void arch_ioport_disable_port ( ioport_port_t  port,
ioport_port_mask_t  mask 
)
static
static __always_inline void arch_ioport_enable_pin ( ioport_pin_t  pin)
static
static __always_inline void arch_ioport_enable_port ( ioport_port_t  port,
ioport_port_mask_t  mask 
)
static
static __always_inline ioport_port_mask_t arch_ioport_get_port_level ( ioport_port_t  port,
ioport_port_mask_t  mask 
)
static
static __always_inline void arch_ioport_init ( void  )
static

Referenced by ioport_init().

static __always_inline ioport_port_t arch_ioport_pin_to_port_id ( ioport_pin_t  pin)
static
static __always_inline void arch_ioport_set_pin_dir ( ioport_pin_t  pin,
enum ioport_direction  dir 
)
static
static __always_inline void arch_ioport_set_pin_mode ( ioport_pin_t  pin,
ioport_mode_t  mode 
)
static
static __always_inline void arch_ioport_set_pin_sense_mode ( ioport_pin_t  pin,
enum ioport_sense  pin_sense 
)
static
static __always_inline void arch_ioport_set_port_dir ( ioport_port_t  port,
ioport_port_mask_t  mask,
enum ioport_direction  dir 
)
static
static __always_inline void arch_ioport_set_port_level ( ioport_port_t  port,
ioport_port_mask_t  mask,
enum ioport_value  level 
)
static
static __always_inline void arch_ioport_set_port_sense_mode ( ioport_port_t  port,
ioport_port_mask_t  mask,
enum ioport_sense  pin_sense 
)
static
static __always_inline void arch_ioport_toggle_pin_level ( ioport_pin_t  pin)
static
static __always_inline void arch_ioport_toggle_port_level ( ioport_port_t  port,
ioport_port_mask_t  mask 
)
static