mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +03:00
Added registration for bus devices.
This commit is contained in:
parent
f6b1c6a539
commit
386be8d742
25 changed files with 116 additions and 5 deletions
|
@ -61,6 +61,7 @@ bool cliMode = false;
|
|||
#include "drivers/accgyro/accgyro.h"
|
||||
#include "drivers/adc.h"
|
||||
#include "drivers/buf_writer.h"
|
||||
#include "drivers/bus_i2c.h"
|
||||
#include "drivers/bus_spi.h"
|
||||
#include "drivers/dma.h"
|
||||
#include "drivers/dma_reqmap.h"
|
||||
|
@ -4706,6 +4707,21 @@ static void cliStatus(const char *cmdName, char *cmdline)
|
|||
|
||||
cliPrintLinef("Configuration: %s, size: %d, max available: %d", configurationStates[systemConfigMutable()->configurationState], getEEPROMConfigSize(), getEEPROMStorageSize());
|
||||
|
||||
// Devices
|
||||
#if defined(USE_SPI) || defined(USE_I2C)
|
||||
cliPrint("Devices detected:");
|
||||
#if defined(USE_SPI)
|
||||
cliPrintf(" SPI:%d", spiGetRegisteredDeviceCount());
|
||||
#if defined(USE_I2C)
|
||||
cliPrint(",");
|
||||
#endif
|
||||
#endif
|
||||
#if defined(USE_I2C)
|
||||
cliPrintf(" I2C:%d", i2cGetRegisteredDeviceCount());
|
||||
#endif
|
||||
cliPrintLinefeed();
|
||||
#endif
|
||||
|
||||
// Sensors
|
||||
cliPrint("Gyros detected:");
|
||||
bool found = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue