Skip to content

Commit d7dda28

Browse files
author
Erwan GOURIOU
committed
[dev_asynch_i2c] Extend asynch I2C to STM32F4 boards
Move i2c_s to common_objects.h Introduce I2C Master/Slave asynch test Test I2C asynch master/slave on STM32F4 boards
1 parent 1707b3c commit d7dda28

File tree

22 files changed

+186
-99
lines changed

22 files changed

+186
-99
lines changed

hal/targets.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@
783783
"progen": {"target": "nucleo-f401re"},
784784
"detect_code": ["0720"],
785785
"macros": ["TRANSACTION_QUEUE_SIZE_SPI=2"],
786-
"device_has": ["ANALOGIN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
786+
"device_has": ["ANALOGIN", "ERROR_RED", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
787787
"release_versions": ["2", "5"]
788788
},
789789
"NUCLEO_F410RB": {
@@ -796,7 +796,7 @@
796796
"progen": {"target": "nucleo-f410rb"},
797797
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT", "TRANSACTION_QUEUE_SIZE_SPI=2"],
798798
"detect_code": ["0740"],
799-
"device_has": ["ANALOGIN", "ANALOGOUT", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
799+
"device_has": ["ANALOGIN", "ANALOGOUT", "ERROR_RED", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
800800
"release_versions": ["2", "5"]
801801
},
802802
"NUCLEO_F411RE": {
@@ -834,7 +834,7 @@
834834
"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
835835
"progen": {"target": "nucleo-f429zi"},
836836
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT", "DEVICE_RTC_LSI=1", "TRANSACTION_QUEUE_SIZE_SPI=2"],
837-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
837+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "RTC_LSI", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
838838
"detect_code": ["0796"],
839839
"features": ["IPV4"],
840840
"release_versions": ["2", "5"]
@@ -849,7 +849,7 @@
849849
"progen": {"target": "nucleo-f446re"},
850850
"detect_code": ["0777"],
851851
"macros": ["TRANSACTION_QUEUE_SIZE_SPI=2"],
852-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
852+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
853853
"release_versions": ["2", "5"]
854854
},
855855
"NUCLEO_F446ZE": {
@@ -862,7 +862,8 @@
862862
"progen": {"target": "nucleo-f446ze"},
863863
"detect_code": ["0778"],
864864
"macros": ["TRANSACTION_QUEUE_SIZE_SPI=2"],
865-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"]
865+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
866+
"release_versions": ["2", "5"]
866867
},
867868

868869
"B96B_F446VE": {
@@ -1077,7 +1078,7 @@
10771078
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT","DEVICE_RTC_LSI=1","TRANSACTION_QUEUE_SIZE_SPI=2"],
10781079
"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
10791080
"progen": {"target": "disco-f429zi"},
1080-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
1081+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
10811082
"release_versions": ["2", "5"]
10821083
},
10831084
"DISCO_F469NI": {
@@ -1090,7 +1091,7 @@
10901091
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT","TRANSACTION_QUEUE_SIZE_SPI=2"],
10911092
"progen": {"target": "disco-f469ni"},
10921093
"detect_code": ["0788"],
1093-
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
1094+
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
10941095
"release_versions": ["2", "5"]
10951096
},
10961097
"DISCO_L053C8": {

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_ARCH_MAX/objects.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
68+
7269

7370
#include "common_objects.h"
7471
#include "gpio_object.h"

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_B96B_F446VE/objects.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
7268

7369
struct can_s {
7470
CANName can;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/objects.h

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

63-
struct i2c_s {
64-
I2CName i2c;
65-
uint32_t slave;
66-
};
67-
6863
#include "common_objects.h"
6964
#include "gpio_object.h"
7065

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F407VG/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
72-
7368
#include "common_objects.h"
7469
#include "gpio_object.h"
7570

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
72-
7368
struct can_s {
7469
CANName can;
7570
int index;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F469NI/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
72-
7368
struct can_s {
7469
CANName can;
7570
int index;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_ELMO_F411RE/objects.h

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

63-
struct i2c_s {
64-
I2CName i2c;
65-
uint32_t slave;
66-
};
67-
6863
#include "common_objects.h"
6964
#include "gpio_object.h"
7065

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_MTS_DRAGONFLY_F411RE/objects.h

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

63-
struct i2c_s {
64-
I2CName i2c;
65-
uint32_t slave;
66-
};
67-
6863
#include "common_objects.h"
6964
#include "gpio_object.h"
7065

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F405RG/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
72-
7368
#include "common_objects.h"
7469
#include "gpio_object.h"
7570

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F411RE/objects.h

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

63-
struct i2c_s {
64-
I2CName i2c;
65-
uint32_t slave;
66-
};
67-
6863
#include "common_objects.h"
6964
#include "gpio_object.h"
7065

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/objects.h

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

63-
struct i2c_s {
64-
I2CName i2c;
65-
uint32_t slave;
66-
};
67-
6863
#include "common_objects.h"
6964
#include "gpio_object.h"
7065

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F410RB/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
72-
7368
#include "common_objects.h"
7469
#include "gpio_object.h"
7570

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F429ZI/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
72-
7368
struct can_s {
7469
CANName can;
7570
int index;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446RE/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
72-
7368
struct can_s {
7469
CANName can;
7570
int index;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F446ZE/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ struct dac_s {
6565
uint8_t channel;
6666
};
6767

68-
struct i2c_s {
69-
I2CName i2c;
70-
uint32_t slave;
71-
};
72-
7368
struct can_s {
7469
CANName can;
7570
int index;

hal/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_UBLOX_C029/objects.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ struct analogin_s {
6262

6363

6464

65-
struct i2c_s {
66-
I2CName i2c;
67-
uint32_t slave;
68-
};
69-
7065
#include "common_objects.h"
7166
struct can_s {
7267
CANName can;

0 commit comments

Comments
 (0)