Skip to content

Commit 81beeb1

Browse files
authored
Merge pull request #2888 from LMESTM/dev_spi_asynch_stm
Dev spi asynch stm
2 parents 78f1067 + aeac255 commit 81beeb1

File tree

54 files changed

+886
-3224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+886
-3224
lines changed

targets/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/objects.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,6 @@ struct dac_s {
6666
uint32_t channel;
6767
};
6868

69-
struct spi_s {
70-
SPIName spi;
71-
uint32_t bits;
72-
uint32_t cpol;
73-
uint32_t cpha;
74-
uint32_t mode;
75-
uint32_t nss;
76-
uint32_t br_presc;
77-
PinName pin_miso;
78-
PinName pin_mosi;
79-
PinName pin_sclk;
80-
PinName pin_ssel;
81-
};
82-
8369
struct i2c_s {
8470
I2CName i2c;
8571
};

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/objects.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,6 @@ struct analogin_s {
6060
uint32_t channel;
6161
};
6262

63-
struct spi_s {
64-
SPIName spi;
65-
uint32_t bits;
66-
uint32_t cpol;
67-
uint32_t cpha;
68-
uint32_t mode;
69-
uint32_t nss;
70-
uint32_t br_presc;
71-
PinName pin_miso;
72-
PinName pin_mosi;
73-
PinName pin_sclk;
74-
PinName pin_ssel;
75-
};
76-
7763
struct i2c_s {
7864
I2CName i2c;
7965
};

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/objects.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,6 @@ struct analogin_s {
6060
uint32_t channel;
6161
};
6262

63-
struct spi_s {
64-
SPIName spi;
65-
uint32_t bits;
66-
uint32_t cpol;
67-
uint32_t cpha;
68-
uint32_t mode;
69-
uint32_t nss;
70-
uint32_t br_presc;
71-
PinName pin_miso;
72-
PinName pin_mosi;
73-
PinName pin_sclk;
74-
PinName pin_ssel;
75-
};
76-
7763
struct i2c_s {
7864
I2CName i2c;
7965
};

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/objects.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,6 @@ struct analogin_s {
6060
uint32_t channel;
6161
};
6262

63-
struct spi_s {
64-
SPIName spi;
65-
uint32_t bits;
66-
uint32_t cpol;
67-
uint32_t cpha;
68-
uint32_t mode;
69-
uint32_t nss;
70-
uint32_t br_presc;
71-
PinName pin_miso;
72-
PinName pin_mosi;
73-
PinName pin_sclk;
74-
PinName pin_ssel;
75-
};
76-
7763
struct i2c_s {
7864
I2CName i2c;
7965
};

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/objects.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,6 @@ struct analogin_s {
6060
uint32_t channel;
6161
};
6262

63-
struct spi_s {
64-
SPIName spi;
65-
uint32_t bits;
66-
uint32_t cpol;
67-
uint32_t cpha;
68-
uint32_t mode;
69-
uint32_t nss;
70-
uint32_t br_presc;
71-
PinName pin_miso;
72-
PinName pin_mosi;
73-
PinName pin_sclk;
74-
PinName pin_ssel;
75-
};
76-
7763
struct i2c_s {
7864
I2CName i2c;
7965
};

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/objects.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,6 @@ struct dac_s {
6666
uint32_t channel;
6767
};
6868

69-
struct spi_s {
70-
SPIName spi;
71-
uint32_t bits;
72-
uint32_t cpol;
73-
uint32_t cpha;
74-
uint32_t mode;
75-
uint32_t nss;
76-
uint32_t br_presc;
77-
PinName pin_miso;
78-
PinName pin_mosi;
79-
PinName pin_sclk;
80-
PinName pin_ssel;
81-
};
82-
8369
struct i2c_s {
8470
I2CName i2c;
8571
};

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/objects.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,6 @@ struct dac_s {
6666
uint32_t channel;
6767
};
6868

69-
struct spi_s {
70-
SPIName spi;
71-
uint32_t bits;
72-
uint32_t cpol;
73-
uint32_t cpha;
74-
uint32_t mode;
75-
uint32_t nss;
76-
uint32_t br_presc;
77-
PinName pin_miso;
78-
PinName pin_mosi;
79-
PinName pin_sclk;
80-
PinName pin_ssel;
81-
};
82-
8369
struct i2c_s {
8470
I2CName i2c;
8571
};

targets/TARGET_STM/TARGET_STM32F0/common_objects.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ struct pwmout_s {
4949
uint8_t inverted;
5050
};
5151

52+
struct spi_s {
53+
SPI_HandleTypeDef handle;
54+
IRQn_Type spiIRQ;
55+
SPIName spi;
56+
PinName pin_miso;
57+
PinName pin_mosi;
58+
PinName pin_sclk;
59+
PinName pin_ssel;
60+
#ifdef DEVICE_SPI_ASYNCH
61+
uint32_t event;
62+
uint8_t module;
63+
uint8_t transfer_type;
64+
#endif
65+
};
66+
5267
struct serial_s {
5368
UARTName uart;
5469
int index; // Used by irq

0 commit comments

Comments
 (0)