Skip to content

Commit e850355

Browse files
authored
Merge pull request #4509 from kegilbert/17q2-spi_sdcard-rebase2
NRF52840: enabled SdBlockDevice capability
2 parents a59a319 + f324647 commit e850355

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/sdk/sdk_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,7 @@
19621962

19631963

19641964
#ifndef SPI0_USE_EASY_DMA
1965-
#define SPI0_USE_EASY_DMA 1
1965+
#define SPI0_USE_EASY_DMA 0
19661966
#endif
19671967

19681968
// <o> SPI0_DEFAULT_FREQUENCY - SPI frequency
@@ -1992,7 +1992,7 @@
19921992

19931993

19941994
#ifndef SPI1_USE_EASY_DMA
1995-
#define SPI1_USE_EASY_DMA 1
1995+
#define SPI1_USE_EASY_DMA 0
19961996
#endif
19971997

19981998
// <o> SPI1_DEFAULT_FREQUENCY - SPI frequency
@@ -2022,7 +2022,7 @@
20222022

20232023

20242024
#ifndef SPI2_USE_EASY_DMA
2025-
#define SPI2_USE_EASY_DMA 1
2025+
#define SPI2_USE_EASY_DMA 0
20262026
#endif
20272027

20282028
// <q> SPI2_DEFAULT_FREQUENCY - Use EasyDMA

targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,13 @@ static void master_event_handler(uint8_t spi_idx,
141141

142142
if (p_event->type == NRF_DRV_SPI_EVENT_DONE) {
143143
p_spi_info->flag.busy = false;
144+
#if DEVICE_SPI_ASYNCH
144145
if (p_spi_info->handler) {
145146
void (*handler)(void) = (void (*)(void))p_spi_info->handler;
146147
p_spi_info->handler = 0;
147148
handler();
148149
}
150+
#endif
149151
}
150152
}
151153
#define MASTER_EVENT_HANDLER(idx) \

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2829,7 +2829,7 @@
28292829
"supported_form_factors": ["ARDUINO"],
28302830
"inherits": ["MCU_NRF52840"],
28312831
"macros_add": ["BOARD_PCA10056", "CONFIG_GPIO_AS_PINRESET", "SWI_DISABLE0", "NRF52_ERRATA_20"],
2832-
"device_has": ["FLASH", "ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE", "TRNG"],
2832+
"device_has": ["FLASH", "ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "TRNG"],
28332833
"release_versions": ["2", "5"],
28342834
"device_name": "nRF52840_xxAA"
28352835
},

0 commit comments

Comments
 (0)