mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Allow disabling of I2C for targets that do not use it.
This commit is contained in:
parent
15cbeff86e
commit
35280abfed
14 changed files with 46 additions and 11 deletions
|
@ -1161,7 +1161,13 @@ static void cliStatus(char *cmdline)
|
|||
}
|
||||
cliPrint("\r\n");
|
||||
|
||||
printf("Cycle Time: %d, I2C Errors: %d, config size: %d\r\n", cycleTime, i2cGetErrorCounter(), sizeof(master_t));
|
||||
#ifdef USE_I2C
|
||||
uint16_t i2cErrorCounter = i2cGetErrorCounter();
|
||||
#else
|
||||
uint16_t i2cErrorCounter = 0;
|
||||
#endif
|
||||
|
||||
printf("Cycle Time: %d, I2C Errors: %d, config size: %d\r\n", cycleTime, i2cErrorCounter, sizeof(master_t));
|
||||
}
|
||||
|
||||
static void cliVersion(char *cmdline)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue