mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Move defaults for I2CX_OVERCLOCK to allow compilation without specifying
overclock settings
This commit is contained in:
parent
3be994a880
commit
2cbd860da0
2 changed files with 13 additions and 17 deletions
|
@ -39,23 +39,6 @@
|
||||||
|
|
||||||
#include "pg/bus_i2c.h"
|
#include "pg/bus_i2c.h"
|
||||||
|
|
||||||
// Backward compatibility for overclocking and internal pullup.
|
|
||||||
// These will eventually be configurable through PG-based configurator
|
|
||||||
// (and/or probably through some cli extension).
|
|
||||||
|
|
||||||
#ifndef I2C1_OVERCLOCK
|
|
||||||
#define I2C1_OVERCLOCK false
|
|
||||||
#endif
|
|
||||||
#ifndef I2C2_OVERCLOCK
|
|
||||||
#define I2C2_OVERCLOCK false
|
|
||||||
#endif
|
|
||||||
#ifndef I2C3_OVERCLOCK
|
|
||||||
#define I2C3_OVERCLOCK false
|
|
||||||
#endif
|
|
||||||
#ifndef I2C4_OVERCLOCK
|
|
||||||
#define I2C4_OVERCLOCK false
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void i2cHardwareConfigure(const i2cConfig_t *i2cConfig)
|
void i2cHardwareConfigure(const i2cConfig_t *i2cConfig)
|
||||||
{
|
{
|
||||||
for (int index = 0 ; index < I2CDEV_COUNT ; index++) {
|
for (int index = 0 ; index < I2CDEV_COUNT ; index++) {
|
||||||
|
|
|
@ -177,6 +177,19 @@
|
||||||
|
|
||||||
#endif // I2C_FULL_RECONFIGURABILITY
|
#endif // I2C_FULL_RECONFIGURABILITY
|
||||||
|
|
||||||
|
#ifndef I2C1_OVERCLOCK
|
||||||
|
#define I2C1_OVERCLOCK false
|
||||||
|
#endif
|
||||||
|
#ifndef I2C2_OVERCLOCK
|
||||||
|
#define I2C2_OVERCLOCK false
|
||||||
|
#endif
|
||||||
|
#ifndef I2C3_OVERCLOCK
|
||||||
|
#define I2C3_OVERCLOCK false
|
||||||
|
#endif
|
||||||
|
#ifndef I2C4_OVERCLOCK
|
||||||
|
#define I2C4_OVERCLOCK false
|
||||||
|
#endif
|
||||||
|
|
||||||
// Default values for internal pullup
|
// Default values for internal pullup
|
||||||
|
|
||||||
#if defined(USE_I2C_PULLUP)
|
#if defined(USE_I2C_PULLUP)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue