Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
f093d104
Commit
f093d104
authored
9 years ago
by
malo
Browse files
Options
Downloads
Patches
Plain Diff
msp430: spi/uart cleaned up USIC - USCI confusion
Signed-off-by:
malo
<
malo@25cmsquare.io
>
parent
1e00c2b4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
boards/z1/include/periph_conf.h
+2
-2
2 additions, 2 deletions
boards/z1/include/periph_conf.h
cpu/msp430fxyz/periph/spi.c
+4
-4
4 additions, 4 deletions
cpu/msp430fxyz/periph/spi.c
cpu/msp430fxyz/periph/uart.c
+1
-1
1 addition, 1 deletion
cpu/msp430fxyz/periph/uart.c
with
7 additions
and
7 deletions
boards/z1/include/periph_conf.h
+
2
−
2
View file @
f093d104
...
@@ -53,7 +53,7 @@ extern "C" {
...
@@ -53,7 +53,7 @@ extern "C" {
#define UART_NUMOF (1U)
#define UART_NUMOF (1U)
#define UART_0_EN (1U)
#define UART_0_EN (1U)
#define UART_USE_US
I
C
#define UART_USE_USC
I
#define UART_BASE (USCI_0)
#define UART_BASE (USCI_0)
#define UART_IE (SFR->IE2)
#define UART_IE (SFR->IE2)
#define UART_IF (SFR->IFG2)
#define UART_IF (SFR->IFG2)
...
@@ -75,7 +75,7 @@ extern "C" {
...
@@ -75,7 +75,7 @@ extern "C" {
#define SPI_0_EN (1U)
#define SPI_0_EN (1U)
/* SPI configuration */
/* SPI configuration */
#define SPI_USE_US
I
C
#define SPI_USE_USC
I
#define SPI_DEV (USCI_0_B_SPI)
#define SPI_DEV (USCI_0_B_SPI)
#define SPI_IE (SFR->IE2)
#define SPI_IE (SFR->IE2)
#define SPI_IF (SFR->IFG2)
#define SPI_IF (SFR->IFG2)
...
...
This diff is collapsed.
Click to expand it.
cpu/msp430fxyz/periph/spi.c
+
4
−
4
View file @
f093d104
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
static
mutex_t
spi_lock
=
MUTEX_INIT
;
static
mutex_t
spi_lock
=
MUTEX_INIT
;
/* per default, we use the legacy MSP430 USART module for UART functionality */
/* per default, we use the legacy MSP430 USART module for UART functionality */
#ifndef SPI_USE_US
I
C
#ifndef SPI_USE_USC
I
int
spi_init_master
(
spi_t
dev
,
spi_conf_t
conf
,
spi_speed_t
speed
)
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)
...
@@ -100,9 +100,9 @@ int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed)
return
0
;
return
0
;
}
}
/* we use alternative SPI code in case the board used the US
I
C module for SPI
/* we use alternative SPI code in case the board used the USC
I
module for SPI
* instead of the (older) USART module */
* instead of the (older) USART module */
#else
/* SPI_USE_US
I
C */
#else
/* SPI_USE_USC
I
*/
int
spi_init_master
(
spi_t
dev
,
spi_conf_t
conf
,
spi_speed_t
speed
)
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)
...
@@ -169,7 +169,7 @@ int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed)
return
0
;
return
0
;
}
}
#endif
/*
UART
_USE_US
I
C */
#endif
/*
SPI
_USE_USC
I
*/
int
spi_init_slave
(
spi_t
dev
,
spi_conf_t
conf
,
char
(
*
cb
)(
char
data
))
int
spi_init_slave
(
spi_t
dev
,
spi_conf_t
conf
,
char
(
*
cb
)(
char
data
))
{
{
...
...
This diff is collapsed.
Click to expand it.
cpu/msp430fxyz/periph/uart.c
+
1
−
1
View file @
f093d104
...
@@ -34,7 +34,7 @@ static void *ctx_isr_arg;
...
@@ -34,7 +34,7 @@ static void *ctx_isr_arg;
static
int
init_base
(
uart_t
uart
,
uint32_t
baudrate
);
static
int
init_base
(
uart_t
uart
,
uint32_t
baudrate
);
/* per default, we use the legacy MSP430 USART module for UART functionality */
/* per default, we use the legacy MSP430 USART module for UART functionality */
#ifndef UART_USE_US
I
C
#ifndef UART_USE_USC
I
int
uart_init
(
uart_t
uart
,
uint32_t
baudrate
,
uart_rx_cb_t
rx_cb
,
void
*
arg
)
int
uart_init
(
uart_t
uart
,
uint32_t
baudrate
,
uart_rx_cb_t
rx_cb
,
void
*
arg
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment