Skip to content

Commit 4a6c41f

Browse files
Donatien Garniermprse
authored andcommitted
Add more DEVICE_SPI guards to other files
1 parent 9475558 commit 4a6c41f

File tree

10 files changed

+19
-3
lines changed

10 files changed

+19
-3
lines changed

targets/TARGET_ARM_SSG/TARGET_BEETLE/analogin_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "spi_api.h"
2323
#include "pinmap.h"
2424

25-
#if DEVICE_ANALOGIN
25+
#if DEVICE_ANALOGIN && DEVICE_SPI
2626

2727
/*
2828
* Channel Address for the next acquisition:

targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/analogin_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* available on the MPS2 Adapter for Arduino shields.
2020
*/
2121

22+
#if DEVICE_ANALOGIN && DEVICE_SPI
23+
2224
#include "analogin_api.h"
2325
#include "gpio_api.h"
2426
#include "spi_api.h"
@@ -151,3 +153,5 @@ float analogin_read(analogin_t *obj)
151153

152154
return (result * (1. / MAXIMUM_VALUE_12_BITS));
153155
}
156+
157+
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32GG/PeripheralPins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ MBED_WEAK const PinMap PinMap_PWM[] = {
117117
};
118118

119119
/*************SPI**************/
120+
#if SPI_DEVICE
120121
MBED_WEAK const PinMap PinMap_SPI_MOSI[] = {
121122
#ifdef USART0_BASE
122123
/* USART0 */
@@ -204,6 +205,7 @@ MBED_WEAK const PinMap PinMap_SPI_CS[] = {
204205
/* Not connected */
205206
{NC , NC , NC}
206207
};
208+
#endif
207209

208210
/************UART**************/
209211
MBED_WEAK const PinMap PinMap_UART_TX[] = {

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32LG/PeripheralPins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ MBED_WEAK const PinMap PinMap_PWM[] = {
117117
};
118118

119119
/*************SPI**************/
120+
#if DEVICE_SPI
120121
MBED_WEAK const PinMap PinMap_SPI_MOSI[] = {
121122
#ifdef USART0_BASE
122123
/* USART0 */
@@ -204,6 +205,7 @@ MBED_WEAK const PinMap PinMap_SPI_CS[] = {
204205
/* Not connected */
205206
{NC , NC , NC}
206207
};
208+
#endif
207209

208210
/************UART**************/
209211
MBED_WEAK const PinMap PinMap_UART_TX[] = {

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32PG/PeripheralPins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ MBED_WEAK const PinMap PinMap_PWM[] = {
198198
};
199199

200200
/*************SPI**************/
201+
#if SPI_DEVICE
201202
MBED_WEAK const PinMap PinMap_SPI_MOSI[] = {
202203
#ifdef USART0_BASE
203204
/* USART0 */
@@ -368,6 +369,7 @@ MBED_WEAK const PinMap PinMap_SPI_CS[] = {
368369
#endif
369370
{NC , NC , NC}
370371
};
372+
#endif
371373

372374
/************UART**************/
373375
MBED_WEAK const PinMap PinMap_UART_TX[] = {

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32PG12/PeripheralPins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ MBED_WEAK const PinMap PinMap_PWM[] = {
262262
};
263263

264264
/*************SPI**************/
265+
#if DEVICE_SPI
265266
MBED_WEAK const PinMap PinMap_SPI_MOSI[] = {
266267
#ifdef USART0_BASE
267268
/* USART0 */
@@ -584,6 +585,7 @@ MBED_WEAK const PinMap PinMap_SPI_CS[] = {
584585
#endif
585586
{NC , NC , NC}
586587
};
588+
#endif
587589

588590
/************UART**************/
589591
MBED_WEAK const PinMap PinMap_UART_TX[] = {

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32WG/PeripheralPins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ MBED_WEAK const PinMap PinMap_PWM[] = {
117117
};
118118

119119
/*************SPI**************/
120+
#if DEVICE_SPI
120121
MBED_WEAK const PinMap PinMap_SPI_MOSI[] = {
121122
#ifdef USART0_BASE
122123
/* USART0 */
@@ -204,6 +205,7 @@ MBED_WEAK const PinMap PinMap_SPI_CS[] = {
204205
/* Not connected */
205206
{NC , NC , NC}
206207
};
208+
#endif
207209

208210
/************UART**************/
209211
MBED_WEAK const PinMap PinMap_UART_TX[] = {

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG1/PeripheralPins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ MBED_WEAK const PinMap PinMap_PWM[] = {
198198
};
199199

200200
/*************SPI**************/
201+
#if DEVICE_SPI
201202
MBED_WEAK const PinMap PinMap_SPI_MOSI[] = {
202203
#ifdef USART0_BASE
203204
/* USART0 */
@@ -368,6 +369,7 @@ MBED_WEAK const PinMap PinMap_SPI_CS[] = {
368369
#endif
369370
{NC , NC , NC}
370371
};
372+
#endif
371373

372374
/************UART**************/
373375
MBED_WEAK const PinMap PinMap_UART_TX[] = {

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG12/PeripheralPins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ MBED_WEAK const PinMap PinMap_PWM[] = {
265265
};
266266

267267
/*************SPI**************/
268+
#if DEVICE_SPI
268269
MBED_WEAK const PinMap PinMap_SPI_MOSI[] = {
269270
#ifdef USART0_BASE
270271
/* USART0 */
@@ -587,6 +588,7 @@ MBED_WEAK const PinMap PinMap_SPI_CS[] = {
587588
#endif
588589
{NC , NC , NC}
589590
};
591+
#endif
590592

591593
/************UART**************/
592594
MBED_WEAK const PinMap PinMap_UART_TX[] = {

targets/targets.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,6 @@
14081408
"inherits": ["K64F"],
14091409
"extra_labels_add": ["K64F"],
14101410
"extra_labels_remove": ["FRDM"],
1411-
"components_remove": ["SD"],
14121411
"supported_form_factors": [],
14131412
"detect_code": ["3105"]
14141413
},
@@ -1712,7 +1711,6 @@
17121711
"UBRIDGE": {
17131712
"inherits": ["K82F"],
17141713
"extra_labels_remove": ["FRDM"],
1715-
"components_remove": ["SPIF"],
17161714
"device_has_remove": ["QSPI"],
17171715
"supported_form_factors": []
17181716
},

0 commit comments

Comments
 (0)