Xmega Application Note


IO PORT Driver

Defines

#define IOPORT_CREATE_PIN(port, pin)   ((PORT_##port) + (pin))
 Create a PORT pin number.

Typedefs

typedef uint8_t pin_mask_t
 A bitmask representing a set of pins on a port.
typedef uint8_t port_id_t
 A port id.
typedef uint16_t port_pin_flags_t
 Pin configuration flags.
typedef uint8_t port_pin_t
 A PORT pin.

Functions

static void ioport_configure_group (port_id_t port, pin_mask_t pin_mask, port_pin_flags_t flags)
 Configure a group of I/O pins on a specified port number.
static void ioport_configure_pin (port_pin_t pin, port_pin_flags_t flags)
 Select the port function for a single pin.
void ioport_configure_port_pin (void *port, pin_mask_t pin_mask, port_pin_flags_t flags)
 Configure the IO PORT pin function for a set of pins on a port.
static bool ioport_get_value (port_pin_t pin)
 Read the current state of a PORT pin.
static void * ioport_id_pin_to_port (port_id_t port)
 Create a pointer to a port from a PORT id number.
static bool ioport_pin_is_high (port_pin_t pin)
 Read the current state of a PORT pin and test high level.
static bool ioport_pin_is_low (port_pin_t pin)
 Read the current state of a PORT pin and test high level.
static pin_mask_t ioport_pin_to_mask (port_pin_t pin)
 Generate port pin mask form PORT pin number.
static void * ioport_pin_to_port (port_pin_t pin)
 Create a pointer to a port from a PORT pin number.
static void ioport_set_group_high (port_id_t port_id, pin_mask_t port_mask)
 Drives a group of I/O pin of a port to high level.
static void ioport_set_group_low (port_id_t port_id, pin_mask_t port_mask)
 Drives a group of I/O pin of a port to low level.
static void ioport_set_pin_high (port_pin_t pin)
 Drive a PORT pin to a high level.
static void ioport_set_pin_low (port_pin_t pin)
 Drive a PORT pin to a low level.
static void ioport_set_value (port_pin_t pin, bool value)
 Drive a PORT pin to a given state.
static void ioport_tgl_group (port_id_t port_id, pin_mask_t port_mask)
 Toggles a group of I/O pin of a port.
static void ioport_toggle_pin (port_pin_t pin)
 Toggle the current state of a PORT pin.

Input/Sense Configuration Flags



#define IOPORT_BOTHEDGES   (0 << 0)
 Sense Both Edges.
#define IOPORT_FALLING   (2 << 0)
 Sense Falling Edge.
#define IOPORT_INPUT_DISABLE   (7 << 0)
 Input Buffer Disabled.
#define IOPORT_LEVEL   (3 << 0)
 Sense Low Level.
#define IOPORT_RISING   (1 << 0)
 Sense Risign Edge.

Output and Pull Configuration Flags



#define IOPORT_BUSKEEPER   (1 << 3)
 Bus Keeper.
#define IOPORT_PULL_DOWN   (2 << 3)
 Pull-Down (when input).
#define IOPORT_PULL_UP   (3 << 3)
 Pull-Up (when input).
#define IOPORT_TOTEM   (0 << 3)
 Normal push/pull output.
#define IOPORT_WIRED_AND   (5 << 3)
 Wired AND.
#define IOPORT_WIRED_AND_PULL_UP   (7 << 3)
 Wired AND and Pull-Up.
#define IOPORT_WIRED_OR   (4 << 3)
 Wired OR.
#define IOPORT_WIRED_OR_PULL_DOWN   (6 << 3)
 Wired OR and Pull-Down.

Input/Output Configuration Flags



#define IOPORT_DIR_INPUT   (0 << 8)
 Pin is Input.
#define IOPORT_DIR_OUTPUT   (1 << 8)
 Pin is Output.

Initial Output State Flags



#define IOPORT_INIT_HIGH   (1 << 9)
 Initial Ouptput State is High.
#define IOPORT_INIT_LOW   (0 << 9)
 Initial Ouptput State is Low.

Inverted I/O Configuration Flags



#define IOPORT_INV_DISABLE   (0 << 6)
 I/O is Not Inverted.
#define IOPORT_INV_ENABLED   (1 << 6)
 I/O is Inverted.

Slew Rate Limit Configuration Flags



#define IOPORT_SRL_DISABLED   (0 << 7)
 Slew Rate Limit Disabled.
#define IOPORT_SRL_ENABLED   (1 << 7)
 Slew Rate Limit Enabled.

PORT fields struture offset

For internal use only.

These macros are used to compute the field offset nummber with the PORT_t struture.



#define PORT_DIR   0x00
 Data Direction.
#define PORT_DIRCLR   0x02
 Data Direction Clear.
#define PORT_DIRSET   0x01
 Data Direction Set.
#define PORT_DIRTGL   0x03
 Data Direction Toggle.
#define PORT_IN   0x08
 Data Input Value.
#define PORT_INT0MASK   0x0A
 Interrupt 0 Mask.
#define PORT_INT1MASK   0x0B
 Interrupt 1 Mask.
#define PORT_INTCTRL   0x09
 Interrupt Control.
#define PORT_INTFLAGS   0x0C
 Interrupt Flags.
#define PORT_OUT   0x04
 Data Output Value.
#define PORT_OUTCLR   0x06
 Data Output Value Clear.
#define PORT_OUTSET   0x05
 Data Output Value Set.
#define PORT_OUTTGL   0x07
 Data Output Value Toggle.
#define PORT_PIN0CTRL   0x10
 Pin 0 Configuration.
#define PORT_PIN1CTRL   0x11
 Pin 1 Configuration.
#define PORT_PIN2CTRL   0x12
 Pin 2 Configuration.
#define PORT_PIN3CTRL   0x13
 Pin 3 Configuration.
#define PORT_PIN4CTRL   0x14
 Pin 4 Configuration.
#define PORT_PIN5CTRL   0x15
 Pin 5 Configuration.
#define PORT_PIN6CTRL   0x16
 Pin 6 Configuration.
#define PORT_PIN7CTRL   0x17
 Pin 7 Configuration.

PORT Pin Numbering

For internal use only.

These macros are used to generate PORT pin numbers for each port with the CREATE_PORT_PIN macro. Each port has 8 pins so e.g. the first pin on PORTB gets number 8, first pin on PORTC gets 16 ...



#define PORT_PORTA   (0 * 8)
#define PORT_PORTB   (1 * 8)
#define PORT_PORTC   (2 * 8)
#define PORT_PORTD   (3 * 8)
#define PORT_PORTE   (4 * 8)
#define PORT_PORTF   (5 * 8)
#define PORT_PORTG   (6 * 8)
#define PORT_PORTH   (7 * 8)
#define PORT_PORTJ   (8 * 8)
#define PORT_PORTK   (9 * 8)
#define PORT_PORTL   (10 * 8)
#define PORT_PORTM   (11 * 8)
#define PORT_PORTN   (12 * 8)
#define PORT_PORTP   (13 * 8)
#define PORT_PORTQ   (14 * 8)
#define PORT_PORTR   (15 * 8)

Detailed Description

This is a driver implementation for the I/O ports peripheral. The I/O ports peripheral can be found on XMEGA devices and it controls and configures the I/O pins.


Define Documentation

#define IOPORT_BOTHEDGES   (0 << 0)

Sense Both Edges.

Definition at line 98 of file ioport.h.

#define IOPORT_BUSKEEPER   (1 << 3)

Bus Keeper.

Definition at line 108 of file ioport.h.

#define IOPORT_CREATE_PIN ( port,
pin   )     ((PORT_##port) + (pin))

Create a PORT pin number.

This macro creates a PORT pin number from a pin on a port. The PORT pin number can be used with the functions provided from this driver.

Parameters:
port Port name e.g. PORTA.
pin Pin number on the port, valid values are 0 to 7.

Definition at line 139 of file ioport.h.

Referenced by board_init().

#define IOPORT_DIR_INPUT   (0 << 8)

Pin is Input.

Definition at line 86 of file ioport.h.

Referenced by board_init().

#define IOPORT_DIR_OUTPUT   (1 << 8)

Pin is Output.

Definition at line 87 of file ioport.h.

Referenced by board_init(), and ioport_configure_port_pin().

#define IOPORT_FALLING   (2 << 0)

Sense Falling Edge.

Definition at line 100 of file ioport.h.

#define IOPORT_INIT_HIGH   (1 << 9)

Initial Ouptput State is High.

Definition at line 93 of file ioport.h.

Referenced by board_init(), and ioport_configure_port_pin().

#define IOPORT_INIT_LOW   (0 << 9)

Initial Ouptput State is Low.

Definition at line 92 of file ioport.h.

#define IOPORT_INPUT_DISABLE   (7 << 0)

Input Buffer Disabled.

Definition at line 102 of file ioport.h.

#define IOPORT_INV_DISABLE   (0 << 6)

I/O is Not Inverted.

Definition at line 120 of file ioport.h.

#define IOPORT_INV_ENABLED   (1 << 6)

I/O is Inverted.

Definition at line 119 of file ioport.h.

#define IOPORT_LEVEL   (3 << 0)

Sense Low Level.

Definition at line 101 of file ioport.h.

#define IOPORT_PULL_DOWN   (2 << 3)

Pull-Down (when input).

Definition at line 109 of file ioport.h.

#define IOPORT_PULL_UP   (3 << 3)

Pull-Up (when input).

Definition at line 110 of file ioport.h.

Referenced by board_init().

#define IOPORT_RISING   (1 << 0)

Sense Risign Edge.

Definition at line 99 of file ioport.h.

#define IOPORT_SRL_DISABLED   (0 << 7)

Slew Rate Limit Disabled.

Definition at line 126 of file ioport.h.

#define IOPORT_SRL_ENABLED   (1 << 7)

Slew Rate Limit Enabled.

Definition at line 125 of file ioport.h.

#define IOPORT_TOTEM   (0 << 3)

Normal push/pull output.

Definition at line 107 of file ioport.h.

#define IOPORT_WIRED_AND   (5 << 3)

Wired AND.

Definition at line 112 of file ioport.h.

#define IOPORT_WIRED_AND_PULL_UP   (7 << 3)

Wired AND and Pull-Up.

Definition at line 114 of file ioport.h.

#define IOPORT_WIRED_OR   (4 << 3)

Wired OR.

Definition at line 111 of file ioport.h.

#define IOPORT_WIRED_OR_PULL_DOWN   (6 << 3)

Wired OR and Pull-Down.

Definition at line 113 of file ioport.h.

#define PORT_DIR   0x00

Data Direction.

Definition at line 257 of file ioport.h.

#define PORT_DIRCLR   0x02

Data Direction Clear.

Definition at line 259 of file ioport.h.

Referenced by ioport_configure_port_pin().

#define PORT_DIRSET   0x01

Data Direction Set.

Definition at line 258 of file ioport.h.

Referenced by ioport_configure_port_pin().

#define PORT_DIRTGL   0x03

Data Direction Toggle.

Definition at line 260 of file ioport.h.

#define PORT_IN   0x08

Data Input Value.

Definition at line 265 of file ioport.h.

#define PORT_INT0MASK   0x0A

Interrupt 0 Mask.

Definition at line 267 of file ioport.h.

#define PORT_INT1MASK   0x0B

Interrupt 1 Mask.

Definition at line 268 of file ioport.h.

#define PORT_INTCTRL   0x09

Interrupt Control.

Definition at line 266 of file ioport.h.

#define PORT_INTFLAGS   0x0C

Interrupt Flags.

Definition at line 269 of file ioport.h.

#define PORT_OUT   0x04

Data Output Value.

Definition at line 261 of file ioport.h.

#define PORT_OUTCLR   0x06

Data Output Value Clear.

Definition at line 263 of file ioport.h.

Referenced by ioport_configure_port_pin().

#define PORT_OUTSET   0x05

Data Output Value Set.

Definition at line 262 of file ioport.h.

Referenced by ioport_configure_port_pin().

#define PORT_OUTTGL   0x07

Data Output Value Toggle.

Definition at line 264 of file ioport.h.

#define PORT_PIN0CTRL   0x10

Pin 0 Configuration.

Definition at line 270 of file ioport.h.

Referenced by ioport_configure_port_pin().

#define PORT_PIN1CTRL   0x11

Pin 1 Configuration.

Definition at line 271 of file ioport.h.

#define PORT_PIN2CTRL   0x12

Pin 2 Configuration.

Definition at line 272 of file ioport.h.

#define PORT_PIN3CTRL   0x13

Pin 3 Configuration.

Definition at line 273 of file ioport.h.

#define PORT_PIN4CTRL   0x14

Pin 4 Configuration.

Definition at line 274 of file ioport.h.

#define PORT_PIN5CTRL   0x15

Pin 5 Configuration.

Definition at line 275 of file ioport.h.

#define PORT_PIN6CTRL   0x16

Pin 6 Configuration.

Definition at line 276 of file ioport.h.

#define PORT_PIN7CTRL   0x17

Pin 7 Configuration.

Definition at line 277 of file ioport.h.

#define PORT_PORTA   (0 * 8)

Definition at line 232 of file ioport.h.

#define PORT_PORTB   (1 * 8)

Definition at line 233 of file ioport.h.

#define PORT_PORTC   (2 * 8)

Definition at line 234 of file ioport.h.

#define PORT_PORTD   (3 * 8)

Definition at line 235 of file ioport.h.

#define PORT_PORTE   (4 * 8)

Definition at line 236 of file ioport.h.

#define PORT_PORTF   (5 * 8)

Definition at line 237 of file ioport.h.

#define PORT_PORTG   (6 * 8)

Definition at line 238 of file ioport.h.

#define PORT_PORTH   (7 * 8)

Definition at line 239 of file ioport.h.

#define PORT_PORTJ   (8 * 8)

Definition at line 240 of file ioport.h.

#define PORT_PORTK   (9 * 8)

Definition at line 241 of file ioport.h.

#define PORT_PORTL   (10 * 8)

Definition at line 242 of file ioport.h.

#define PORT_PORTM   (11 * 8)

Definition at line 243 of file ioport.h.

#define PORT_PORTN   (12 * 8)

Definition at line 244 of file ioport.h.

#define PORT_PORTP   (13 * 8)

Definition at line 245 of file ioport.h.

#define PORT_PORTQ   (14 * 8)

Definition at line 246 of file ioport.h.

#define PORT_PORTR   (15 * 8)

Definition at line 247 of file ioport.h.


Typedef Documentation

typedef uint8_t pin_mask_t

A bitmask representing a set of pins on a port.

Starting from pin 0 as the LSB, each bit in the mask corresponds to a pin on some port. Each '1' bit includes the corresponding pin in the set.

Definition at line 60 of file ioport.h.

typedef uint8_t port_id_t

A port id.

This type is used to describe the port id on the part (0 is PORTA).

Definition at line 82 of file ioport.h.

typedef uint16_t port_pin_flags_t

Pin configuration flags.

This is a bitmask containing configuration flags for the pins that shall be configured.

Definition at line 75 of file ioport.h.

typedef uint8_t port_pin_t

A PORT pin.

This type is used to describe the PORT pins on the part.

Definition at line 67 of file ioport.h.


Function Documentation

static void ioport_configure_group ( port_id_t  port,
pin_mask_t  pin_mask,
port_pin_flags_t  flags 
) [inline, static]

Configure a group of I/O pins on a specified port number.

Parameters:
port The port number
pin_mask The pin mask to configure
flags Bitmask of flags specifying additional configuration parameters.

Definition at line 217 of file ioport.h.

References ioport_configure_port_pin(), and ioport_id_pin_to_port().

00218 {
00219         ioport_configure_port_pin(ioport_id_pin_to_port(port), pin_mask, flags);
00220 }

Here is the call graph for this function:

static void ioport_configure_pin ( port_pin_t  pin,
port_pin_flags_t  flags 
) [inline, static]

Select the port function for a single pin.

Parameters:
pin The pin to configure
flags Bitmask of flags specifying additional configuration parameters.

Definition at line 203 of file ioport.h.

References ioport_configure_port_pin(), ioport_pin_to_mask(), and ioport_pin_to_port().

Referenced by board_init().

00204 {
00205         ioport_configure_port_pin(ioport_pin_to_port(pin), ioport_pin_to_mask(pin), flags);
00206 }

Here is the call graph for this function:

void ioport_configure_port_pin ( void *  port,
pin_mask_t  pin_mask,
port_pin_flags_t  flags 
)

Configure the IO PORT pin function for a set of pins on a port.

Parameters:
port Pointer to the port
pin_mask Mask containing the pins that should be configured
flags Bitmask of flags specifying additional configuration parameters.

Definition at line 40 of file ioport.c.

References IOPORT_DIR_OUTPUT, IOPORT_INIT_HIGH, PORT_DIRCLR, PORT_DIRSET, PORT_OUTCLR, PORT_OUTSET, and PORT_PIN0CTRL.

Referenced by ioport_configure_group(), and ioport_configure_pin().

00041 {
00042         uint8_t pin;
00043 
00044         for (pin = 0; pin < 8; pin++) {
00045                 if (pin_mask & (1 << pin)) {
00046                         *((uint8_t*)port+PORT_PIN0CTRL+pin)=flags;
00047                 }
00048         }
00049         /* Select direction and initial pin state */
00050         if (flags & IOPORT_DIR_OUTPUT) {
00051                 if (flags & IOPORT_INIT_HIGH) {
00052                         *((uint8_t*)port+PORT_OUTSET)=pin_mask;
00053                 }
00054                 else {
00055                         *((uint8_t*)port+PORT_OUTCLR)=pin_mask;
00056                 }
00057                 *((uint8_t*)port+PORT_DIRSET)=pin_mask;
00058         }
00059         else {
00060                 *((uint8_t*)port+PORT_DIRCLR)=pin_mask;
00061         }
00062 }

static bool ioport_get_value ( port_pin_t  pin  )  [inline, static]

Read the current state of a PORT pin.

Parameters:
pin A number identifying the pin to read.
Return values:
true The pin is currently high (close to Vdd)
false The pin is currently low (close to Vss)

Definition at line 336 of file ioport.h.

References ioport_pin_to_mask(), and ioport_pin_to_port().

00337 {
00338         PORT_t *port = ioport_pin_to_port(pin);
00339         return port->IN&ioport_pin_to_mask(pin);
00340 }

Here is the call graph for this function:

static void* ioport_id_pin_to_port ( port_id_t  port  )  [inline, static]

Create a pointer to a port from a PORT id number.

It is assumed that all ports are lined up after PORTA in the memory map like it is described in the XMEGA A manual. Otherwise we have to do a switch case here.

Parameters:
port PORT id number. (PORTA is 0, PORTB is 1 ...)
Returns:
Pointer to the port on which the pin is located.

Definition at line 168 of file ioport.h.

Referenced by ioport_configure_group(), ioport_set_group_high(), ioport_set_group_low(), and ioport_tgl_group().

00169 {
00170         // Each port has an offset of 0x20
00171         return (void *)((uintptr_t)&PORTA + port * 0x20);
00172 }

static bool ioport_pin_is_high ( port_pin_t  pin  )  [inline, static]

Read the current state of a PORT pin and test high level.

Parameters:
pin A number identifying the pin to read.
Return values:
true The pin is currently high (close to Vdd)
false The pin is currently low (close to Vss)

Definition at line 349 of file ioport.h.

References ioport_pin_to_mask(), and ioport_pin_to_port().

00350 {
00351         PORT_t *port = ioport_pin_to_port(pin);
00352         return port->IN&ioport_pin_to_mask(pin);
00353 }

Here is the call graph for this function:

static bool ioport_pin_is_low ( port_pin_t  pin  )  [inline, static]

Read the current state of a PORT pin and test high level.

Parameters:
pin A number identifying the pin to read.
Return values:
true The pin is currently high (close to Vdd)
false The pin is currently low (close to Vss)

Definition at line 362 of file ioport.h.

References ioport_pin_to_mask(), and ioport_pin_to_port().

00363 {
00364         PORT_t *port = ioport_pin_to_port(pin);
00365         return (~port->IN&ioport_pin_to_mask(pin));
00366 }

Here is the call graph for this function:

static pin_mask_t ioport_pin_to_mask ( port_pin_t  pin  )  [inline, static]

Generate port pin mask form PORT pin number.

Parameters:
pin PORT pin number.
Returns:
Pin mask.

Definition at line 180 of file ioport.h.

Referenced by ioport_configure_pin(), ioport_get_value(), ioport_pin_is_high(), ioport_pin_is_low(), ioport_set_pin_high(), ioport_set_pin_low(), ioport_set_value(), and ioport_toggle_pin().

00181 {
00182         return 1U << (pin & 0x7);
00183 }

static void* ioport_pin_to_port ( port_pin_t  pin  )  [inline, static]

Create a pointer to a port from a PORT pin number.

It is assumed that all ports are lined up after PORTA in the memory map like it is described in the XMEGA A manual. Otherwise we have to do a switch case here.

Parameters:
pin PORT pin number. This number can be generated by the macro CREATE_PORT_PIN.
Returns:
Pointer to the port on which the pin is located.

Definition at line 152 of file ioport.h.

Referenced by ioport_configure_pin(), ioport_get_value(), ioport_pin_is_high(), ioport_pin_is_low(), ioport_set_pin_high(), ioport_set_pin_low(), ioport_set_value(), and ioport_toggle_pin().

00153 {
00154         // Each port has an offset of 0x20
00155         return (void *)((uintptr_t)&PORTA + (pin >> 3) * 0x20);
00156 }

static void ioport_set_group_high ( port_id_t  port_id,
pin_mask_t  port_mask 
) [inline, static]

Drives a group of I/O pin of a port to high level.

Parameters:
port_id The port number.
port_mask The mask.

Definition at line 384 of file ioport.h.

References ioport_id_pin_to_port().

00385 {
00386         PORT_t *port  = ioport_id_pin_to_port(port_id);
00387         port->OUTSET = port_mask;
00388 }

Here is the call graph for this function:

static void ioport_set_group_low ( port_id_t  port_id,
pin_mask_t  port_mask 
) [inline, static]

Drives a group of I/O pin of a port to low level.

Parameters:
port_id The port number.
port_mask The mask.

Definition at line 395 of file ioport.h.

References ioport_id_pin_to_port().

00396 {
00397         PORT_t *port  = ioport_id_pin_to_port(port_id);
00398         port->OUTCLR = port_mask;
00399 }

Here is the call graph for this function:

static void ioport_set_pin_high ( port_pin_t  pin  )  [inline, static]

Drive a PORT pin to a high level.

This function will only have an effect if pin is configured as an output.

Parameters:
pin A number identifying the pin to act on.

Definition at line 323 of file ioport.h.

References ioport_pin_to_mask(), and ioport_pin_to_port().

00324 {
00325         PORT_t *port = ioport_pin_to_port(pin);
00326         port->OUTSET=ioport_pin_to_mask(pin);
00327 }

Here is the call graph for this function:

static void ioport_set_pin_low ( port_pin_t  pin  )  [inline, static]

Drive a PORT pin to a low level.

This function will only have an effect if pin is configured as an output.

Parameters:
pin A number identifying the pin to act on.

Definition at line 309 of file ioport.h.

References ioport_pin_to_mask(), and ioport_pin_to_port().

00310 {
00311         PORT_t *port = ioport_pin_to_port(pin);
00312         port->OUTCLR=ioport_pin_to_mask(pin);
00313 }

Here is the call graph for this function:

static void ioport_set_value ( port_pin_t  pin,
bool  value 
) [inline, static]

Drive a PORT pin to a given state.

This function will only have an effect if pin is configured as an output.

Parameters:
pin A number identifying the pin to act on.
value The desired state of the pin. true means drive the pin high (towards Vdd), while false means drive the pin low (towards Vss).

Definition at line 292 of file ioport.h.

References ioport_pin_to_mask(), and ioport_pin_to_port().

00293 {
00294         PORT_t *port = ioport_pin_to_port(pin);
00295         if (value)
00296                 port->OUTSET=ioport_pin_to_mask(pin);
00297         else
00298                 port->OUTCLR=ioport_pin_to_mask(pin);
00299 }

Here is the call graph for this function:

static void ioport_tgl_group ( port_id_t  port_id,
pin_mask_t  port_mask 
) [inline, static]

Toggles a group of I/O pin of a port.

Parameters:
port_id The port number.
port_mask The mask.

Definition at line 406 of file ioport.h.

References ioport_id_pin_to_port().

00407 {
00408         PORT_t *port  = ioport_id_pin_to_port(port_id);
00409         port->OUTTGL = port_mask;
00410 }

Here is the call graph for this function:

static void ioport_toggle_pin ( port_pin_t  pin  )  [inline, static]

Toggle the current state of a PORT pin.

Parameters:
pin A number identifying the pin to act on.

Definition at line 372 of file ioport.h.

References ioport_pin_to_mask(), and ioport_pin_to_port().

00373 {
00374         pin_mask_t pin_mask = ioport_pin_to_mask(pin);
00375         PORT_t *port = ioport_pin_to_port(pin);
00376         port->OUTTGL = pin_mask;
00377 }

Here is the call graph for this function:

@DOC_TITLE@
Generated on Fri Oct 22 12:15:26 2010 for AVR1300 Using the Xmega ADC by doxygen 1.6.3