From cdcdd185af3dcff9d4994141bdd53433b0526bfe Mon Sep 17 00:00:00 2001 From: Hauke Petersen <hauke.petersen@fu-berlin.de> Date: Tue, 15 Sep 2015 16:20:49 +0200 Subject: [PATCH] boards/nucleo-l1: adapted UART configuration --- boards/nucleo-l1/include/periph_conf.h | 8 +++----- cpu/stm32l1/include/periph_cpu.h | 1 - cpu/stm32l1/periph/uart.c | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/boards/nucleo-l1/include/periph_conf.h b/boards/nucleo-l1/include/periph_conf.h index fa0b85f63b..aa18c55360 100644 --- a/boards/nucleo-l1/include/periph_conf.h +++ b/boards/nucleo-l1/include/periph_conf.h @@ -72,11 +72,9 @@ static const timer_conf_t timer_config[] = { #define UART_0_ISR isr_usart2 #define UART_0_BUS_FREQ 32000000 /* UART 0 pin configuration */ -#define UART_0_PORT GPIOA -#define UART_0_PORT_CLKEN() (RCC->AHBENR |= RCC_AHBENR_GPIOAEN) -#define UART_0_RX_PIN 3 -#define UART_0_TX_PIN 2 -#define UART_0_AF 7 +#define UART_0_RX_PIN GPIO(PORT_A, 3) +#define UART_0_TX_PIN GPIO(PORT_A, 2) +#define UART_0_AF GPIO_AF7 /** * @brief GPIO configuration diff --git a/cpu/stm32l1/include/periph_cpu.h b/cpu/stm32l1/include/periph_cpu.h index 3bbb5603cb..a5507a76e1 100644 --- a/cpu/stm32l1/include/periph_cpu.h +++ b/cpu/stm32l1/include/periph_cpu.h @@ -81,7 +81,6 @@ typedef enum { } gpio_af_t; /** - * @brief Configure the alternate function for the given pin * * @note This is meant for internal use in STM32L1 peripheral drivers only diff --git a/cpu/stm32l1/periph/uart.c b/cpu/stm32l1/periph/uart.c index bcda613fba..a73c6253d5 100644 --- a/cpu/stm32l1/periph/uart.c +++ b/cpu/stm32l1/periph/uart.c @@ -99,7 +99,6 @@ int uart_init_blocking(uart_t uart, uint32_t baudrate) gpio_t rx_pin = 0; gpio_af_t af = 0; float clk = 0; - float divider; uint16_t mantissa; uint8_t fraction; -- GitLab