# chip/at32uc3a3/include/chip/portmux.h File Reference

AT32UC3A3 portmux configuration. More...

`#include <gpio/portmux_gpio.h>`

Include dependency graph for portmux.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | PORTMUX_USART_RX (1 << 0)
| Enable USART RX pin.
#define | PORTMUX_USART_TX (1 << 1)
| Enable USART TX pin.
#define | PORTMUX_TWI_ALERT (1 << 0)
| Enable SMBus Alert.
#define | PORTMUX_USBB_ID (1 << 0)
| Enable USBB ID pin.
#define | PORTMUX_USBB_VBOF (1 << 1)
| Enable USBB VBOF pin.
## Functions
static unsigned int | portmux_gpio_version (void)
| Return the version of the GPIO module on this chip.
static void | portmux_enable_usart (unsigned int id, unsigned long flags, unsigned long drive_strength)
| Configure the portmux to enable a given USART.
static void | portmux_enable_usbb (unsigned long flags)
| Configure the portmux to enable the USBB controller.
static void | portmux_enable_spi (unsigned int id, unsigned long drive_strength)
| Configure the portmux to enable a given SPI controller.

## Detailed Description

AT32UC3A3 portmux configuration.

- Compiler: IAR EWAVR32 and GNU GCC for AVR32
- Supported devices: AT32UC3A3
- AppNote:

Author:
  Atmel Corporation: http://www.atmel.com
  Support and FAQ: http://support.atmel.no/

Definition in file portmux.h.

## Define Documentation

#define PORTMUX_TWI_ALERT (1 << 0)

Enable SMBus Alert.

Definition at line 134 of file portmux.h.

#define PORTMUX_USART_RX (1 << 0)

Enable USART RX pin.

Definition at line 66 of file portmux.h.

#define PORTMUX_USART_TX (1 << 1)

Enable USART TX pin.

Definition at line 67 of file portmux.h.

#define PORTMUX_USBB_ID (1 << 0)

Enable USBB ID pin.

Definition at line 161 of file portmux.h.

Referenced by portmux_enable_usbb().

#define PORTMUX_USBB_VBOF (1 << 1)

Enable USBB VBOF pin.

Definition at line 162 of file portmux.h.

Referenced by portmux_enable_usbb().

## Function Documentation

static void portmux_enable_spi | ( | unsigned int | id,
|  | unsigned long | drive_strength |
| ) |  |  | `[inline, static]`

Configure the portmux to enable a given SPI controller.

Parameters:

  | id | The ID of the SPI controller to be configured.
  | drive_strength | The required drive strength of the SPI pins.

Definition at line 283 of file portmux.h.

References is_constant.

static void portmux_enable_usart | ( | unsigned int | id,
|  | unsigned long | flags,
|  | unsigned long | drive_strength |
| ) |  |  | `[inline, static]`

Configure the portmux to enable a given USART.

Parameters:

  | id | The USART ID to configure.
  | flags | Flags indicating which pins to set up: `PORTMUX_USART_RX:` Enable USART RX pin. `PORTMUX_USART_TX:` Enable USART TX pin.
  | drive_strength | The required drive strength of the USART pins.

Definition at line 125 of file portmux.h.

References is_constant.

static void portmux_enable_usbb | ( | unsigned long | flags | ) | `[inline, static]`

Configure the portmux to enable the USBB controller.

Parameters:

  | flags | Flags indicating which USBB pins to set up.

Todo:
  We actually have five different alternatives for each pin...

Definition at line 171 of file portmux.h.

References portmux_select_peripheral(), PORTMUX_USBB_ID, and PORTMUX_USBB_VBOF.

Here is the call graph for this function:

static unsigned int portmux_gpio_version | ( | void |  | ) | `[inline, static]`

Return the version of the GPIO module on this chip.

Definition at line 55 of file portmux.h.

References PORTMUX_GPIO_VER.

Referenced by portmux_select_gpio(), and portmux_select_peripheral().