Configurated pins for SECURED peripherals
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11395 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
789d91f0f5
commit
240b09a926
|
@ -82,16 +82,64 @@ typedef struct {
|
|||
* @note The list is terminated by a {-1, 0, 0, 0}
|
||||
*/
|
||||
static const sama_pio_init_t sama_inits[] = {
|
||||
/* RGB Led */
|
||||
/* Led */
|
||||
{SAMA_PIOB,
|
||||
SAMA_PIN_N(PIOB_LED_BLUE) | SAMA_PIN_N(PIOB_LED_GREEN),
|
||||
SAMA_PIO_FUNC_GPIO | SAMA_PIO_DIR_OUTPUT | SAMA_PIO_DRVSTR_HI,
|
||||
SAMA_PIO_HIGH},
|
||||
/* RGB Led */
|
||||
{SAMA_PIOD,
|
||||
SAMA_PIN_N(PIOD_LED_RGB_BLUE) |
|
||||
SAMA_PIN_N(PIOD_LED_RGB_RED),
|
||||
SAMA_PIO_FUNC_GPIO | SAMA_PIO_DIR_OUTPUT | SAMA_PIO_DRVSTR_HI,
|
||||
SAMA_PIO_HIGH},
|
||||
/* User Button */
|
||||
{SAMA_PIOB,
|
||||
SAMA_PIN_N(PIOB_USER_PB),
|
||||
SAMA_PIO_FUNC_GPIO | SAMA_PIO_DIR_INPUT | SAMA_PIO_PUEN | SAMA_PIO_SCHMITT,
|
||||
SAMA_PIO_HIGH},
|
||||
/* UART0 */
|
||||
{SAMA_PIOB,
|
||||
SAMA_PIN_N(PIOB_URXD0) | SAMA_PIN_N(PIOB_UTXD0),
|
||||
SAMA_PIO_FUNC_PERIPH_C,
|
||||
SAMA_PIO_HIGH},
|
||||
/* UART1 */
|
||||
{SAMA_PIOD,
|
||||
SAMA_PIN_N(PIOD_URXD1) | SAMA_PIN_N(PIOD_UTXD1),
|
||||
SAMA_PIO_FUNC_PERIPH_A,
|
||||
SAMA_PIO_HIGH},
|
||||
/* UART2 */
|
||||
{SAMA_PIOD,
|
||||
SAMA_PIN_N(PIOD_URXD2) | SAMA_PIN_N(PIOD_UTXD2),
|
||||
SAMA_PIO_FUNC_PERIPH_B,
|
||||
SAMA_PIO_HIGH},
|
||||
/* UART3 */
|
||||
{SAMA_PIOB,
|
||||
SAMA_PIN_N(PIOB_URXD3) | SAMA_PIN_N(PIOB_UTXD3),
|
||||
SAMA_PIO_FUNC_PERIPH_C,
|
||||
SAMA_PIO_HIGH},
|
||||
/* FLEXUART0 */
|
||||
{SAMA_PIOB,
|
||||
SAMA_PIN_N(PIOB_FTXD0) | SAMA_PIN_N(PIOB_FRXD0),
|
||||
SAMA_PIO_FUNC_PERIPH_C,
|
||||
SAMA_PIO_HIGH},
|
||||
/* FLEXUART4 */
|
||||
{SAMA_PIOD,
|
||||
SAMA_PIN_N(PIOD_FTXD4) | SAMA_PIN_N(PIOD_FRXD4) |
|
||||
SAMA_PIN_N(PIOD_FCTS4) | SAMA_PIN_N(PIOD_FRTS4),
|
||||
SAMA_PIO_FUNC_PERIPH_C,
|
||||
SAMA_PIO_HIGH},
|
||||
/* FLEXSPI2 */
|
||||
{SAMA_PIOD,
|
||||
SAMA_PIN_N(PIOD_FMOSI2) | SAMA_PIN_N(PIOD_FMISO2) |
|
||||
SAMA_PIN_N(PIOD_FSCLK2) | SAMA_PIN_N(PIOD_FNPCS02),
|
||||
SAMA_PIO_FUNC_PERIPH_C,
|
||||
SAMA_PIO_HIGH},
|
||||
/* TC0 TIOA1 */
|
||||
{SAMA_PIOD,
|
||||
SAMA_PIN_N(PIOD_TIOA1),
|
||||
SAMA_PIO_FUNC_PERIPH_A,
|
||||
SAMA_PIO_HIGH},
|
||||
/* list terminated*/
|
||||
{-1, 0, 0, 0}
|
||||
};
|
||||
|
|
|
@ -119,13 +119,13 @@
|
|||
#define PIOB_PIN3 3U
|
||||
#define PIOB_PIN4 4U
|
||||
#define PIOB_LED_GREEN 5U
|
||||
#define PIOB_LED_RED 6U
|
||||
#define PIOB_PIN6 6U
|
||||
#define PIOB_PIN7 7U
|
||||
#define PIOB_PIN8 8U
|
||||
#define PIOB_USER_PB 9U
|
||||
#define PIOB_PIN10 10U
|
||||
#define PIOB_PIN11 11U
|
||||
#define PIOB_PIN12 12U
|
||||
#define PIOB_URXD3 11U
|
||||
#define PIOB_UTXD3 12U
|
||||
#define PIOB_PIN13 13U
|
||||
#define PIOB_ETH_GTXCK 14U
|
||||
#define PIOB_ETH_GTXEN 15U
|
||||
|
@ -139,10 +139,10 @@
|
|||
#define PIOB_ETH_GMDIO 23U
|
||||
#define PIOB_PIN24 24U
|
||||
#define PIOB_PIN25 25U
|
||||
#define PIOB_PIN26 26U
|
||||
#define PIOB_PIN27 27U
|
||||
#define PIOB_PIN28 28U
|
||||
#define PIOB_PIN29 29U
|
||||
#define PIOB_URXD0 26U
|
||||
#define PIOB_UTXD0 27U
|
||||
#define PIOB_FTXD0 28U
|
||||
#define PIOB_FRXD0 29U
|
||||
#define PIOB_PIN30 30U
|
||||
#define PIOB_PIN31 31U
|
||||
|
||||
|
@ -181,18 +181,18 @@
|
|||
|
||||
#define PIOD_PIO0 0U
|
||||
#define PIOD_PIN1 1U
|
||||
#define PIOD_PIN2 2U
|
||||
#define PIOD_PIN3 3U
|
||||
#define PIOD_PIN4 4U
|
||||
#define PIOD_PIN5 5U
|
||||
#define PIOD_URXD1 2U
|
||||
#define PIOD_UTXD1 3U
|
||||
#define PIOD_URXD2 4U
|
||||
#define PIOD_UTXD2 5U
|
||||
#define PIOD_PIN6 6U
|
||||
#define PIOD_PIN7 7U
|
||||
#define PIOD_PIN8 8U
|
||||
#define PIOD_PIN9 9U
|
||||
#define PIOD_PIN10 10U
|
||||
#define PIOD_PIN11 11U
|
||||
#define PIOD_PIN12 12U
|
||||
#define PIOD_PIN13 13U
|
||||
#define PIOD_TIOA1 11U
|
||||
#define PIOD_LED_RGB_RED 12U
|
||||
#define PIOD_LED_RGB_BLUE 13U
|
||||
#define PIOD_PIN14 14U
|
||||
#define PIOD_PIN15 15U
|
||||
#define PIOD_PIN16 16U
|
||||
|
@ -200,15 +200,15 @@
|
|||
#define PIOD_PIN18 18U
|
||||
#define PIOD_PIN19 19U
|
||||
#define PIOD_PIN20 20U
|
||||
#define PIOD_PIN21 21U
|
||||
#define PIOD_PIN22 22U
|
||||
#define PIOD_FTXD4 21U
|
||||
#define PIOD_FRXD4 22U
|
||||
#define PIOD_PIN23 23U
|
||||
#define PIOD_PIN24 24U
|
||||
#define PIOD_PIN25 25U
|
||||
#define PIOD_PIN26 26U
|
||||
#define PIOD_PIN27 27U
|
||||
#define PIOD_PIN28 28U
|
||||
#define PIOD_PIN29 29U
|
||||
#define PIOD_FCTS4 24U
|
||||
#define PIOD_FRTS4 25U
|
||||
#define PIOD_FMOSI2 26U
|
||||
#define PIOD_FMISO2 27U
|
||||
#define PIOD_FSCLK2 28U
|
||||
#define PIOD_FNPCS02 29U
|
||||
#define PIOD_PIN30 30U
|
||||
#define PIOD_PIN31 31U
|
||||
|
||||
|
@ -220,8 +220,9 @@
|
|||
|
||||
#define LINE_LED_BLUE BOARD_LINE(PIOB, 0U)
|
||||
#define LINE_LED_GREEN BOARD_LINE(PIOB, 5U)
|
||||
#define LINE_LED_RED BOARD_LINE(PIOB, 6U)
|
||||
#define LINE_USER_PB BOARD_LINE(PIOB, 9U)
|
||||
#define LINE_LED_RGB_RED BOARD_LINE(PIOD, 12U)
|
||||
#define LINE_LED_RGB_BLUE BOARD_LINE(PIOD, 13U)
|
||||
|
||||
#if !defined(_FROM_ASM_)
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Reference in New Issue