Skip to content

Commit 478168c

Browse files
author
Laurent MEUNIER
committed
[STM32F4] SPI ASYNCH support
This commit is highly derived from an existing work from salkinium. It adds SPI ASYNC support to STM32 F4 devices. This required a small rework of the structure to have SYNCH and ASYNCH co-exist.
1 parent 5fdce5f commit 478168c

File tree

2 files changed

+355
-77
lines changed

2 files changed

+355
-77
lines changed

hal/targets/hal/TARGET_STM/TARGET_STM32F4/common_objects.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ struct serial_s {
6969
};
7070

7171
struct spi_s {
72+
SPI_HandleTypeDef handle;
73+
IRQn_Type spiIRQ;
7274
SPIName spi;
7375
uint32_t bits;
7476
uint32_t cpol;
@@ -80,6 +82,11 @@ struct spi_s {
8082
PinName pin_mosi;
8183
PinName pin_sclk;
8284
PinName pin_ssel;
85+
#ifdef DEVICE_SPI_ASYNCH
86+
uint32_t event;
87+
uint8_t module;
88+
uint8_t transfer_type;
89+
#endif
8390
};
8491

8592
#include "gpio_object.h"

0 commit comments

Comments
 (0)