1
0
Fork 0
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:
Dominic Clifton 2019-08-01 15:32:53 +02:00
parent 3be994a880
commit 2cbd860da0
2 changed files with 13 additions and 17 deletions

View file

@ -39,23 +39,6 @@
#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)
{
for (int index = 0 ; index < I2CDEV_COUNT ; index++) {

View file

@ -177,6 +177,19 @@
#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
#if defined(USE_I2C_PULLUP)