mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
[H7] Enable I2C (HAL)
This commit is contained in:
parent
c82c90159e
commit
0f7c84c0c6
3 changed files with 56 additions and 6 deletions
|
@ -33,12 +33,12 @@
|
|||
|
||||
typedef struct i2cPinDef_s {
|
||||
ioTag_t ioTag;
|
||||
#if defined(STM32F4)
|
||||
#if defined(STM32F4) || defined(STM32H7)
|
||||
uint8_t af;
|
||||
#endif
|
||||
} i2cPinDef_t;
|
||||
|
||||
#if defined(STM32F4)
|
||||
#if defined(STM32F4) || defined(STM32H7)
|
||||
#define I2CPINDEF(pin, af) { DEFIO_TAG_E(pin), af }
|
||||
#elif defined(STM32F1)
|
||||
#define I2CPINDEF(pin, af) { DEFIO_TAG_E(pin) }
|
||||
|
@ -79,7 +79,7 @@ typedef struct i2cDevice_s {
|
|||
I2C_TypeDef *reg;
|
||||
IO_t scl;
|
||||
IO_t sda;
|
||||
#ifdef STM32F4
|
||||
#if defined(STM32F4) || defined(STM32H7)
|
||||
uint8_t sclAF;
|
||||
uint8_t sdaAF;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue