From f093d104094cd84a244470834ddd1c5e314f39e1 Mon Sep 17 00:00:00 2001 From: malo <malo@25cmsquare.io> Date: Thu, 24 Mar 2016 09:42:59 +0100 Subject: [PATCH] msp430: spi/uart cleaned up USIC - USCI confusion Signed-off-by: malo <malo@25cmsquare.io> --- boards/z1/include/periph_conf.h | 4 ++-- cpu/msp430fxyz/periph/spi.c | 8 ++++---- cpu/msp430fxyz/periph/uart.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/boards/z1/include/periph_conf.h b/boards/z1/include/periph_conf.h index cc04401dd3..f29e94bc09 100644 --- a/boards/z1/include/periph_conf.h +++ b/boards/z1/include/periph_conf.h @@ -53,7 +53,7 @@ extern "C" { #define UART_NUMOF (1U) #define UART_0_EN (1U) -#define UART_USE_USIC +#define UART_USE_USCI #define UART_BASE (USCI_0) #define UART_IE (SFR->IE2) #define UART_IF (SFR->IFG2) @@ -75,7 +75,7 @@ extern "C" { #define SPI_0_EN (1U) /* SPI configuration */ -#define SPI_USE_USIC +#define SPI_USE_USCI #define SPI_DEV (USCI_0_B_SPI) #define SPI_IE (SFR->IE2) #define SPI_IF (SFR->IFG2) diff --git a/cpu/msp430fxyz/periph/spi.c b/cpu/msp430fxyz/periph/spi.c index 11768eec91..acdaa57b31 100644 --- a/cpu/msp430fxyz/periph/spi.c +++ b/cpu/msp430fxyz/periph/spi.c @@ -34,7 +34,7 @@ static mutex_t spi_lock = MUTEX_INIT; /* per default, we use the legacy MSP430 USART module for UART functionality */ -#ifndef SPI_USE_USIC +#ifndef SPI_USE_USCI int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed) { @@ -100,9 +100,9 @@ int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed) return 0; } -/* we use alternative SPI code in case the board used the USIC module for SPI +/* we use alternative SPI code in case the board used the USCI module for SPI * instead of the (older) USART module */ -#else /* SPI_USE_USIC */ +#else /* SPI_USE_USCI */ int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed) { @@ -169,7 +169,7 @@ int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed) return 0; } -#endif /* UART_USE_USIC */ +#endif /* SPI_USE_USCI */ int spi_init_slave(spi_t dev, spi_conf_t conf, char (*cb)(char data)) { diff --git a/cpu/msp430fxyz/periph/uart.c b/cpu/msp430fxyz/periph/uart.c index 2fdc89bca9..58e0e3e10e 100644 --- a/cpu/msp430fxyz/periph/uart.c +++ b/cpu/msp430fxyz/periph/uart.c @@ -34,7 +34,7 @@ static void *ctx_isr_arg; static int init_base(uart_t uart, uint32_t baudrate); /* per default, we use the legacy MSP430 USART module for UART functionality */ -#ifndef UART_USE_USIC +#ifndef UART_USE_USCI int uart_init(uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg) { -- GitLab