hdo  beta
Definice maker
Dokumentace souboru /home/mrazik/Documents/web/old/hdo/at91lib/boards/at91sam7s-ek/board.h
#include "at91sam7s256/AT91SAM7S256.h"

Zobrazit zdrojový text tohoto souboru.

Definice maker

#define BOARD_NAME   "AT91SAM7S-EK"
 String containing the name of the board.
#define at91sam7sek
 Board definition.
#define at91sam7s
 Family definition.
#define BOARD_MAINOSC   18432000
 Frequency of the board main oscillator, in Hz.
#define BOARD_MCK   48000000
 Master clock frequency (when using board_lowlevel.c), in Hz.
#define ADC_MAX_CK_10BIT   5000000
 ADC clock frequency, at 10-bit resolution (in Hz)
#define ADC_MAX_CK_8BIT   8000000
 ADC clock frequency, at 8-bit resolution (in Hz)
#define ADC_STARTUP_TIME_MAX   20
 Startup time max, return from Idle mode (in �s)
#define ADC_TRACK_HOLD_TIME_MIN   600
 Track and hold Acquisition Time min (in ns)
#define BOARD_USB_UDP
 Indicates the chip has a UDP controller.
#define BOARD_USB_PULLUP_EXTERNAL
 Indicates the D+ pull-up is externally controlled.
#define BOARD_USB_NUMENDPOINTS   4
 Number of endpoints in the USB controller.
#define BOARD_USB_ENDPOINTS_MAXPACKETSIZE(i)   ((i == 0) ? 8 : 64)
#define BOARD_USB_ENDPOINTS_BANKS(i)   (((i == 0) || (i == 3)) ? 1 : 2)
#define BOARD_USB_BMATTRIBUTES   USBConfigurationDescriptor_SELFPOWERED_NORWAKEUP
 USB attributes configuration descriptor (bus or self powered, remote wakeup)
#define PINS_DBGU   {0x00000600, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 DBGU pins definition. Contains DRXD (PA9) and DTXD (PA10).
#define PIN_LED_DS1   {1 << 31, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
 LED #0 pin definition (PA31).
#define PIN_LED_DS2   {1 << 0, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
 LED #1 pin definition (PA0).
#define PIN_LED_DS3   {1 << 1, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
 LED #2 pin definition (PA1).
#define PIN_LED_DS4   {1 << 2, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
 LED #3 pin definition (PA2).
#define PINS_LEDS   PIN_LED_DS1, PIN_LED_DS2, PIN_LED_DS3, PIN_LED_DS4
 List of the four LED pin definitions (PA0, PA1, PA2 & PA3)
#define PIN_PUSHBUTTON_1   {1 << 19, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEGLITCH | PIO_PULLUP}
 Push button #0 definition (PA19).
#define PIN_PUSHBUTTON_2   {1 << 20, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEGLITCH | PIO_PULLUP}
 Push button #1 definition (PA20).
#define PIN_PUSHBUTTON_3   {1 << 15, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEGLITCH | PIO_PULLUP}
 Push button #2 definition (PA15).
#define PIN_PUSHBUTTON_4   {1 << 14, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEGLITCH | PIO_PULLUP}
 Push button #3 definition (PA14).
#define PINS_PUSHBUTTONS   PIN_PUSHBUTTON_1, PIN_PUSHBUTTON_2, PIN_PUSHBUTTON_3, PIN_PUSHBUTTON_4
 List of all push button definitions (PA19, PA20, PA15 & PA14).
#define PUSHBUTTON_BP1   0
 Push button #1 index.
#define PUSHBUTTON_BP2   1
 Push button #2 index.
#define PUSHBUTTON_BP3   2
 Push button #1 index.
#define PUSHBUTTON_BP4   3
 Push button #2 index.
#define JOYSTICK_LEFT   0
 Simulated joystick LEFT index.
#define JOYSTICK_RIGHT   1
 Simulated joystick RIGHT index.
#define PIN_USART0_RXD   {1 << 5, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 USART0 TXD pin definition (PA5).
#define PIN_USART0_TXD   {1 << 6, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 USART0 RXD pin definition (PA6).
#define PIN_USART0_RTS   {1 << 7, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 USART0 RTS pin definition.
#define PIN_USART0_CTS   {1 << 8, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 USART0 CTS pin definition.
#define PIN_USART0_SCK   {1 << 2, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
 USART0 SCK pin definition.
#define PIN_SPI_MISO   {1 << 12, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_PULLUP}
 SPI MISO pin definition (PA12).
#define PIN_SPI_MOSI   {1 << 13, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 SPI MOSI pin definition (PA13).
#define PIN_SPI_SPCK   {1 << 14, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 SPI SPCK pin definition (PA14).
#define PINS_SPI   PIN_SPI_MISO, PIN_SPI_MOSI, PIN_SPI_SPCK
 SPI pins definition. Contains MISO, MOSI & SPCK (PA12, PA13 & PA14).
#define PIN_SPI_NPCS0   {1 << 11, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 SPI chip select 0 pin definition (PA11).
#define PIN_SPI_NPCS1   {1 << 31, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 SPI chip select 1.
#define PIN_SPI_NPCS2   {1 << 10, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
 SPI chip select 2.
#define PIN_SPI_NPCS3   {1 << 3, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
 SPI chip select 3.
#define PIN_PWMC_PWM0   {1 << 0, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 PWMC PWM0 pin definition (PA0).
#define PIN_PWMC_PWM1   {1 << 1, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 PWMC PWM0 pin definition (PA1).
#define PIN_PWMC_PWM2   {1 << 2, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 PWMC PWM0 pin definition (PA2).
#define PIN_PWM_LED0   PIN_PWMC_PWM1
 PWM pin definition for LED0.
#define PIN_PWM_LED1   PIN_PWMC_PWM2
 PWM pin definition for LED1.
#define CHANNEL_PWM_LED0   1
 PWM channel for LED0.
#define CHANNEL_PWM_LED1   2
 PWM channel for LED1.
#define PINS_TWI   {0x00000018, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT}
 TWI pins definition. Contains TWD (PA3) and TWCK (PA4).
#define PIN_ADC_AD0   {1 << 17, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
 ADC_AD0 pin definition.
#define PIN_ADC_AD1   {1 << 18, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
 ADC_AD1 pin definition.
#define PIN_ADC_AD2   {1 << 19, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
 ADC_AD2 pin definition. (mixed with PIN_PUSHBUTTON_1)
#define PIN_ADC_AD3   {1 << 20, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
 ADC_AD3 pin definition. (mixed with PIN_PUSHBUTTON_2)
#define PINS_ADC   PIN_ADC_AD0, PIN_ADC_AD1, PIN_ADC_AD2, PIN_ADC_AD3
 Pins ADC.
#define PIN_USB_VBUS   {1 << 13, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
 USB VBus monitoring pin definition (PA13).
#define PIN_USB_PULLUP   {1 << 16, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_1, PIO_DEFAULT}
 USB pull-up control pin definition (PA16).
#define BOARD_SD_SPI_BASE   AT91C_BASE_SPI
#define BOARD_SD_SPI_ID   AT91C_ID_SPI
 Identifier of the SPI peripheral connected to the SD card.
#define BOARD_SD_SPI_PINS   PINS_SPI, PIN_SPI_NPCS1
 List of pins to configure to access the SD card.
#define BOARD_SD_NPCS   1
 NPCS number.
#define BOARD_FLASH_EFC
 Indicates chip has an EFC.
#define BOARD_FLASH_IAP_ADDRESS   0x300E08
 Address of the IAP function in ROM.
#define PIN_SMARTCARD_CONNECT   {1 << 5, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_INPUT, PIO_DEFAULT}
 Smartcard detection pin.
#define PIN_ISO7816_RSTMC   {1 << 7, AT91C_BASE_PIOA, AT91C_ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
 PIN used for reset the smartcard.
#define PINS_ISO7816   PIN_USART0_TXD, PIN_USART0_SCK, PIN_ISO7816_RSTMC
 Pins used for connect the smartcard.

Detailní popis

Purpose

Definition of AT91SAM7S-EK characteristics, AT91SAM7S-dependant PIOs and external components interfacing.

Contents This file provide a large number of definitions, which are of three different types.

PIO definitions are prefixed with PIN_ or PINS_. They are to be used with the pio peripheral to configure the pins required by the application.

First, additional information about the platform is provided by several constants:

Contants prefixed with BOARD_USB_ give information about the USB device peripheral that is provided in the chip.

Defines prefixed with PIN_ contain only one pin (and thus can be safely used to initialize a single Pin instance), whereas defines starting with PINS_ contains either a single Pin instance with multiple pins inside it, or a list of several Pin instances; they must be used as Pin[] array initializer values, otherwise they are not safe.

Finally, some information about the flash controller is given by definitions prefixed with BOARD_FLASH_.

Definice v souboru board.h.


Dokumentace k definicím maker

#define BOARD_SD_SPI_BASE   AT91C_BASE_SPI

!SD Card SPI

  • BOARD_SD_SPI_BASE
  • BOARD_SD_SPI_ID
  • BOARD_SD_SPI_PINS
  • BOARD_SD_NPCS Not define in our board, but customer can add this feature Base address of the SPI peripheral connected to the SD card.

Definice je uvedena na řádku 251 v souboru board.h.

#define BOARD_USB_ENDPOINTS_BANKS (   i)    (((i == 0) || (i == 3)) ? 1 : 2)

Returns the number of FIFO banks for the given endpoint.

Parametry:
iEndpoint number.
Návratová hodnota:
Number of FIFO banks for the endpoint.

Definice je uvedena na řádku 131 v souboru board.h.

#define BOARD_USB_ENDPOINTS_MAXPACKETSIZE (   i)    ((i == 0) ? 8 : 64)

Returns the maximum packet size of the given endpoint.

Parametry:
iEndpoint number.
Návratová hodnota:
Maximum packet size in bytes of endpoint.

Definice je uvedena na řádku 126 v souboru board.h.