mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Fix as per @jflyper's comments
This commit is contained in:
parent
c00ffe0427
commit
3d7145b088
2 changed files with 3 additions and 2 deletions
|
@ -45,8 +45,9 @@ typedef enum I2CDevice {
|
|||
#define I2CDEV_COUNT 4
|
||||
#endif
|
||||
|
||||
// Macro to convert CLI bus number to I2CDevice.
|
||||
// Macros to convert between CLI bus number and I2CDevice.
|
||||
#define I2C_CFG_TO_DEV(x) ((x) - 1)
|
||||
#define I2C_DEV_TO_CFG(x) ((x) + 1)
|
||||
|
||||
// I2C device address range in 8-bit address mode
|
||||
#define I2C_ADDR8_MIN 8
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
PG_REGISTER_WITH_RESET_TEMPLATE(dashboardConfig_t, dashboardConfig, PG_DASHBOARD_CONFIG, 0);
|
||||
|
||||
PG_RESET_TEMPLATE(dashboardConfig_t, dashboardConfig,
|
||||
.device = DASHBOARD_I2C_INSTANCE,
|
||||
.device = I2C_DEV_TO_CFG(DASHBOARD_I2C_INSTANCE),
|
||||
.address = DASHBOARD_I2C_ADDRESS,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue