Atmel Software Framework

uc3/ioport.h File Reference

UC3 architecture specific IOPORT service implementation header file.

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

#include <sysclk.h>

Macros

#define IOPORT_CREATE_PIN(port, pin)   ((port) * 32 + (pin))
 Create IOPORT pin number. More...
 
IOPORT Mode bit definitions
#define IOPORT_MODE_MUX_MASK   (7 << 0)
 
#define IOPORT_MODE_MUX_BIT0   (1 << 0)
 
#define IOPORT_MODE_MUX_BIT1   (1 << 1)
 
#define IOPORT_MODE_MUX_A   (0 << 0)
 
#define IOPORT_MODE_MUX_B   (1 << 0)
 
#define IOPORT_MODE_MUX_C   (2 << 0)
 
#define IOPORT_MODE_MUX_D   (3 << 0)
 
#define IOPORT_MODE_PULLUP   (1 << 3)
 
#define IOPORT_MODE_GLITCH_FILTER   (1 << 6)
 

Typedefs

typedef uint32_t ioport_mode_t
 
typedef uint32_t ioport_pin_t
 
typedef uint32_t ioport_port_mask_t
 
typedef uint32_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
volatile avr32_gpio_port_t * 
arch_ioport_pin_to_base (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
volatile avr32_gpio_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, unsigned char group_direction)
 
static __always_inline void arch_ioport_set_port_level (ioport_port_t port, ioport_port_mask_t mask, ioport_port_mask_t 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)
 

typedef uint32_t ioport_mode_t
typedef uint32_t ioport_pin_t
typedef uint32_t ioport_port_mask_t
typedef uint32_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 bool arch_ioport_get_pin_level ( ioport_pin_t  pin)
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

References sysclk_enable_pba_module(), and SYSCLK_GPIO.

Referenced by ioport_init().

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_level ( ioport_pin_t  pin,
bool  level 
)
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,
unsigned char  group_direction 
)
static
static __always_inline void arch_ioport_set_port_level ( ioport_port_t  port,
ioport_port_mask_t  mask,
ioport_port_mask_t  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