board/xplain-bc/include/board.h File Reference

Xplain AT90USB1287 board-specific declarations. More...

#include <gpio.h>

Go to the source code of this file.

Enumerations

enum  board_gpio_id {
  BOARD_SPI_SCK_ID = CREATE_GPIO_PIN(PORTB, 1), BOARD_SPI_MOSI_ID = CREATE_GPIO_PIN(PORTB, 2), BOARD_SPI_MISO_ID = CREATE_GPIO_PIN(PORTB, 3), BOARD_XMEGA_RESET_ID = CREATE_GPIO_PIN(PORTD, 5),
  BOARD_USB_MODE_ID = CREATE_GPIO_PIN(PORTF, 7)
}
 

Board I/O lines definitions.

More...

Functions

void board_gpio_mcu_reset (bool set)
 Control the reset line to the XMEGA chip.
bool board_gpio_is_usb_msc_mode (void)
 Read input line to get if the USB MSC interface should be enabled.
void board_gpio_set_spi_master_mode (bool master_mode)
 Set SPI I/O lines given the SPI mode.

Detailed Description

Xplain AT90USB1287 board-specific declarations.

Copyright (C) 2009 - 2010 Atmel Corporation. All rights reserved.

Definition in file board.h.


Enumeration Type Documentation

Board I/O lines definitions.

Enumerator:
BOARD_SPI_SCK_ID 

SPI clock line.

BOARD_SPI_MOSI_ID 

SPI MOSI line.

BOARD_SPI_MISO_ID 

SPI MISO line.

BOARD_XMEGA_RESET_ID 

Board output line wired to XMEGA chip reset pin.

BOARD_USB_MODE_ID 

Board input line wired to TPI header pin used as user input to select between different USB modes.

Definition at line 44 of file board.h.


Function Documentation

bool board_gpio_is_usb_msc_mode ( void   ) 

Read input line to get if the USB MSC interface should be enabled.

This function will read the BOARD_USB_MODE_ID input line and return true if MSC should be active and false otherwize.

Definition at line 96 of file init.c.

References BOARD_USB_MODE_ID, and gpio_get_value().

Referenced by app_usb_mode_worker(), and main().

void board_gpio_mcu_reset ( bool  set  ) 

Control the reset line to the XMEGA chip.

This function will set or release the reset line to the XMEGA chip depending on the set variable. To hold the XMEGA chip in reset set must be true, to release from reset set must be false.

Definition at line 85 of file init.c.

References BOARD_XMEGA_RESET_ID, and gpio_set_value().

Referenced by app_dataflash_ready(), and app_usb_mode_worker().

void board_gpio_set_spi_master_mode ( bool  master_mode  ) 

Set SPI I/O lines given the SPI mode.

This function will set the SPI I/O lines in master mode when master_mode is true, the I/O lines will be configured for slave mode otherwize.

Definition at line 107 of file init.c.

References BOARD_SPI_MISO_ID, BOARD_SPI_MOSI_ID, BOARD_SPI_SCK_ID, GPIO_DIR_INPUT, GPIO_DIR_OUTPUT, and port_select_gpio_pin().

Referenced by app_dataflash_ready(), and app_usb_mode_worker().

Generated on Thu Apr 29 14:10:34 2010 for xplain-bc by  doxygen 1.6.3