-
Notifications
You must be signed in to change notification settings - Fork 3k
Rethink STM32 I2C v2 HAL #15350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rethink STM32 I2C v2 HAL #15350
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,39 +77,6 @@ struct serial_s { | |
#endif | ||
}; | ||
|
||
struct i2c_s { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a bit silly that this structure is copied verbatim into like 10 different objects.h headers, despite all of them being identical and being used by a single version of i2c_api.c. Since I had to modify the structure, I consolidated these into a single version in |
||
/* The 1st 2 members I2CName i2c | ||
* and I2C_HandleTypeDef handle should | ||
* be kept as the first members of this struct | ||
* to ensure i2c_get_obj to work as expected | ||
*/ | ||
I2CName i2c; | ||
I2C_HandleTypeDef handle; | ||
uint8_t index; | ||
int hz; | ||
PinName sda; | ||
PinName scl; | ||
IRQn_Type event_i2cIRQ; | ||
IRQn_Type error_i2cIRQ; | ||
uint32_t XferOperation; | ||
volatile uint8_t event; | ||
volatile int pending_start; | ||
int current_hz; | ||
#if DEVICE_I2CSLAVE | ||
uint8_t slave; | ||
volatile uint8_t pending_slave_tx_master_rx; | ||
volatile uint8_t pending_slave_rx_maxter_tx; | ||
uint8_t *slave_rx_buffer; | ||
volatile uint16_t slave_rx_buffer_size; | ||
volatile uint16_t slave_rx_count; | ||
#endif | ||
#if DEVICE_I2C_ASYNCH | ||
uint32_t address; | ||
uint8_t stop; | ||
uint8_t available_events; | ||
#endif | ||
}; | ||
|
||
struct analogin_s { | ||
ADC_HandleTypeDef handle; | ||
PinName pin; | ||
|
Uh oh!
There was an error while loading. Please reload this page.