1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-28 07:51:19 +01:00

board/udoo: added missing UART defines

- added defines to periph_conf.h
- added UART feature to Makefile.features
This commit is contained in:
Hauke Petersen 2014-08-15 13:07:33 +02:00
parent 3b193b99b5
commit 778d00b629
2 changed files with 34 additions and 10 deletions

View File

@ -1 +1 @@
FEATURES_PROVIDED += periph_gpio periph_spi periph_random
FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_random

View File

@ -58,15 +58,17 @@ extern "C" {
* @name UART configuration
* @{
*/
#define UART_NUMOF (1U)
#define UART_NUMOF (4U)
#define UART_0_EN 1
#define UART_1_EN 0
#define UART_2_EN 0
#define UART_3_EN 0
#define UART_1_EN 1
#define UART_2_EN 1
#define UART_3_EN 1
#define UART_IRQ_PRIO 1
/* UART 0 device configuration */
#define UART_0_DEV UART
#define UART_0_CLKEN() (PMC->PMC_PCER0 |= (1 << ID_UART))
#define UART_0_CLKDIS() (PMC->PMC_PCER0 &= ~(1 << ID_UART))
#define UART_0_IRQ UART_IRQn
#define UART_0_ISR isr_uart
/* UART 0 pin configuration */
@ -74,12 +76,34 @@ extern "C" {
#define UART_0_PINS (PIO_PA8 | PIO_PA9)
/* UART 1 device configuration */
#define UART_1_DEV USART2
#define UART_1_IRQ USART2_IRQn
#define UART_1_ISR isr_usart2
#define UART_1_DEV USART0
#define UART_1_CLKEN() (PMC->PMC_PCER0 |= (1 << ID_USART0))
#define UART_1_CLKDIS() (PMC->PMC_PCER0 &= ~(1 << ID_USART0))
#define UART_1_IRQ USART0_IRQn
#define UART_1_ISR isr_usart0
/* UART 1 pin configuration */
#define UART_1_PORT GPIOA
#define UART_1_PINS (GPIO_Pin_2 | GPIO_Pin_3)
#define UART_1_PORT PIOA
#define UART_1_PINS (PIO_PA10 | PIO_PA11)
/* UART 1 device configuration */
#define UART_2_DEV USART1
#define UART_2_CLKEN() (PMC->PMC_PCER0 |= (1 << ID_USART1))
#define UART_2_CLKDIS() (PMC->PMC_PCER0 &= ~(1 << ID_USART1))
#define UART_2_IRQ USART1_IRQn
#define UART_2_ISR isr_usart1
/* UART 1 pin configuration */
#define UART_2_PORT PIOA
#define UART_2_PINS (PIO_PA12 | PIO_PA13)
/* UART 1 device configuration */
#define UART_3_DEV USART3
#define UART_3_CLKEN() (PMC->PMC_PCER0 |= (1 << ID_USART3))
#define UART_3_CLKDIS() (PMC->PMC_PCER0 &= ~(1 << ID_USART3))
#define UART_3_IRQ USART3_IRQn
#define UART_3_ISR isr_usart3
/* UART 1 pin configuration */
#define UART_3_PORT PIOD
#define UART_3_PINS (PIO_PD4 | PIO_PD5)
/** @} */
/**