soc: arm: atmel: Add sam4e mcu
Add sam4e related soc files. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
parent
527ebe131d
commit
4a5de7bb87
9 changed files with 564 additions and 0 deletions
63
soc/arm/atmel_sam/sam4e/soc_pinmap.h
Normal file
63
soc/arm/atmel_sam/sam4e/soc_pinmap.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Gerson Fernando Budke
|
||||
* Copyright (c) 2017 Justin Watson
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/** @file
|
||||
* @brief Atmel SAM4E MCU pin definitions.
|
||||
*
|
||||
* This file contains pin configuration data required by different MCU
|
||||
* modules to correctly configure GPIO controller.
|
||||
*/
|
||||
|
||||
#ifndef _ATMEL_SAM4E_SOC_PINMAP_H_
|
||||
#define _ATMEL_SAM4E_SOC_PINMAP_H_
|
||||
|
||||
#include <soc.h>
|
||||
|
||||
/* Universal Asynchronous Receiver Transmitter (UART) */
|
||||
|
||||
#define PIN_UART0_RXD {PIO_PA9A_URXD0, PIOA, ID_PIOA, SOC_GPIO_FUNC_A}
|
||||
#define PIN_UART0_TXD {PIO_PA10A_UTXD0, PIOA, ID_PIOA, SOC_GPIO_FUNC_A}
|
||||
|
||||
#define PINS_UART0 {PIN_UART0_RXD, PIN_UART0_TXD}
|
||||
|
||||
#define PIN_UART1_RXD {PIO_PA5C_URXD1, PIOB, ID_PIOB, SOC_GPIO_FUNC_C}
|
||||
#define PIN_UART1_TXD {PIO_PA6C_UTXD1, PIOB, ID_PIOB, SOC_GPIO_FUNC_C}
|
||||
|
||||
#define PINS_UART1 {PIN_UART1_RXD, PIN_UART1_TXD}
|
||||
|
||||
/* Universal Synchronous Asynchronous Receiver Transmitter (USART) */
|
||||
|
||||
#define PIN_USART0_RXD {PIO_PB0C_RXD0, PIOB, ID_PIOB, SOC_GPIO_FUNC_C}
|
||||
#define PIN_USART0_TXD {PIO_PB1C_TXD0, PIOB, ID_PIOB, SOC_GPIO_FUNC_C}
|
||||
#define PIN_USART0_CTS {PIO_PB2C_CTS0, PIOB, ID_PIOB, SOC_GPIO_FUNC_C}
|
||||
#define PIN_USART0_RTS {PIO_PB3C_RTS0, PIOB, ID_PIOB, SOC_GPIO_FUNC_C}
|
||||
#define PIN_USART0_SCK {PIO_PB13C_SCK0, PIOB, ID_PIOB, SOC_GPIO_FUNC_C}
|
||||
|
||||
#define PINS_USART0 {PIN_USART0_RXD, PIN_USART0_TXD, PIN_USART0_CTS, \
|
||||
PIN_USART0_RTS, PIN_USART0_SCK}
|
||||
|
||||
#define PIN_USART1_RXD {PIO_PA21A_RXD1, PIOA, ID_PIOA, SOC_GPIO_FUNC_A}
|
||||
#define PIN_USART1_TXD {PIO_PA22A_TXD1, PIOB, ID_PIOB, SOC_GPIO_FUNC_D}
|
||||
#define PIN_USART1_CTS {PIO_PA25A_CTS1, PIOA, ID_PIOA, SOC_GPIO_FUNC_A}
|
||||
#define PIN_USART1_RTS {PIO_PA24A_RTS1, PIOA, ID_PIOA, SOC_GPIO_FUNC_A}
|
||||
#define PIN_USART1_SCK {PIO_PA23A_SCK1, PIOA, ID_PIOA, SOC_GPIO_FUNC_A}
|
||||
|
||||
#define PINS_USART1 {PIN_USART1_RXD, PIN_USART1_TXD, PIN_USART1_CTS, \
|
||||
PIN_USART1_RTS, PIN_USART1_SCK}
|
||||
|
||||
/* Two-wire Interface (TWI) */
|
||||
|
||||
#define PIN_TWI0_TWCK {PIO_PA4A_TWCK0, PIOA, ID_PIOA, SOC_GPIO_FUNC_A}
|
||||
#define PIN_TWI0_TWD {PIO_PA3A_TWD0, PIOA, ID_PIOA, SOC_GPIO_FUNC_A}
|
||||
|
||||
#define PINS_TWI0 {PIN_TWI0_TWCK, PIN_TWI0_TWD}
|
||||
|
||||
#define PIN_TWI1_TWCK {PIO_PB5A_TWCK1, PIOB, ID_PIOB, SOC_GPIO_FUNC_A}
|
||||
#define PIN_TWI1_TWD {PIO_PB4A_TWD1, PIOB, ID_PIOB, SOC_GPIO_FUNC_A}
|
||||
|
||||
#define PINS_TWI1 {PIN_TWI1_TWCK, PIN_TWI1_TWD}
|
||||
|
||||
#endif /* _ATMEL_SAM4E_SOC_PINMAP_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue