mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +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
|
@ -50,6 +50,7 @@
|
|||
|
||||
#include "drivers/accgyro/accgyro.h"
|
||||
#include "drivers/bus_i2c.h"
|
||||
#include "drivers/bus_spi.h"
|
||||
#include "drivers/camera_control.h"
|
||||
#include "drivers/compass/compass.h"
|
||||
#include "drivers/display.h"
|
||||
|
@ -686,6 +687,18 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
|
|||
|
||||
sbufWriteU32(dst, configurationProblems);
|
||||
|
||||
// Added in MSP API 1.44
|
||||
#if defined(USE_SPI)
|
||||
sbufWriteU8(dst, spiGetRegisteredDeviceCount());
|
||||
#else
|
||||
sbufWriteU8(dst, 0);
|
||||
#endif
|
||||
#if defined(USE_I2C)
|
||||
sbufWriteU8(dst, i2cGetRegisteredDeviceCount());
|
||||
#else
|
||||
sbufWriteU8(dst, 0);
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue