drivers/gpio/portmux_gpio.c File Reference

GPIO portmux driver. More...

#include <debug.h>
#include <io.h>
#include <chip/memory-map.h>
#include <chip/portmux.h>

Include dependency graph for portmux_gpio.c:

Go to the source code of this file.

Functions

void portmux_select_peripheral (void *port, pin_mask_t pin_mask, enum portmux_function func, unsigned long flags)
 Select a peripheral function for a set of pins.
void portmux_select_gpio (void *port, pin_mask_t pin_mask, unsigned long flags)
 Select the GPIO function for a set of pins.
void gpio_set_value_noninline (gpio_pin_t pin, bool value)
 Drive a GPIO pin to a given state (non-constant pin version).
bool gpio_get_value_noninline (gpio_pin_t pin)
 Read the current state of a GPIO pin (non-constant pin version).


Detailed Description

GPIO portmux driver.

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

Definition in file portmux_gpio.c.


Function Documentation

bool gpio_get_value_noninline ( gpio_pin_t  pin  ) 

Read the current state of a GPIO pin (non-constant pin version).

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 183 of file portmux_gpio.c.

Referenced by gpio_get_value().

void gpio_set_value_noninline ( gpio_pin_t  pin,
bool  value 
)

Drive a GPIO pin to a given state (non-constant pin version).

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 170 of file portmux_gpio.c.

Referenced by gpio_set_value().

void portmux_select_gpio ( void *  port,
pin_mask_t  pin_mask,
unsigned long  flags 
)

Select the GPIO function for a set of pins.

Parameters:
port The GPIO port to which the pins belong.
pin_mask Bitmask of pins on port to be configured.
flags Bitmask of flags specifying additional configuration parameters.

Definition at line 105 of file portmux_gpio.c.

References gpio_write_reg, PORTMUX_GPIO_VER, and portmux_gpio_version().

Referenced by portmux_select_gpio_pin().

Here is the call graph for this function:

void portmux_select_peripheral ( void *  port,
pin_mask_t  pin_mask,
enum portmux_function  func,
unsigned long  flags 
)

Select a peripheral function for a set of pins.

Parameters:
port The GPIO port to which the pins belong.
pin_mask Bitmask of pins on port to be configured.
func The peripheral function to which the pins are to be assigned.
flags Bitmask of flags specifying additional configuration parameters.

Definition at line 56 of file portmux_gpio.c.

References gpio_write_reg, PORTMUX_GPIO_VER, and portmux_gpio_version().

Referenced by portmux_enable_usbb().

Here is the call graph for this function:


Generated on Tue Sep 15 10:19:31 2009 for libavr32 by  doxygen 1.5.8