Skip to content

Commit f093d10

Browse files
committed
msp430: spi/uart cleaned up USIC - USCI confusion
Signed-off-by: malo <malo@25cmsquare.io>
1 parent 1e00c2b commit f093d10

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

boards/z1/include/periph_conf.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extern "C" {
5353
#define UART_NUMOF (1U)
5454
#define UART_0_EN (1U)
5555

56-
#define UART_USE_USIC
56+
#define UART_USE_USCI
5757
#define UART_BASE (USCI_0)
5858
#define UART_IE (SFR->IE2)
5959
#define UART_IF (SFR->IFG2)
@@ -75,7 +75,7 @@ extern "C" {
7575
#define SPI_0_EN (1U)
7676

7777
/* SPI configuration */
78-
#define SPI_USE_USIC
78+
#define SPI_USE_USCI
7979
#define SPI_DEV (USCI_0_B_SPI)
8080
#define SPI_IE (SFR->IE2)
8181
#define SPI_IF (SFR->IFG2)

cpu/msp430fxyz/periph/spi.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
static mutex_t spi_lock = MUTEX_INIT;
3535

3636
/* per default, we use the legacy MSP430 USART module for UART functionality */
37-
#ifndef SPI_USE_USIC
37+
#ifndef SPI_USE_USCI
3838

3939
int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed)
4040
{
@@ -100,9 +100,9 @@ int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed)
100100
return 0;
101101
}
102102

103-
/* we use alternative SPI code in case the board used the USIC module for SPI
103+
/* we use alternative SPI code in case the board used the USCI module for SPI
104104
* instead of the (older) USART module */
105-
#else /* SPI_USE_USIC */
105+
#else /* SPI_USE_USCI */
106106

107107
int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed)
108108
{
@@ -169,7 +169,7 @@ int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed)
169169
return 0;
170170
}
171171

172-
#endif /* UART_USE_USIC */
172+
#endif /* SPI_USE_USCI */
173173

174174
int spi_init_slave(spi_t dev, spi_conf_t conf, char (*cb)(char data))
175175
{

cpu/msp430fxyz/periph/uart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static void *ctx_isr_arg;
3434
static int init_base(uart_t uart, uint32_t baudrate);
3535

3636
/* per default, we use the legacy MSP430 USART module for UART functionality */
37-
#ifndef UART_USE_USIC
37+
#ifndef UART_USE_USCI
3838

3939
int uart_init(uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg)
4040
{

0 commit comments

Comments
 (0)