mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Introduce per device pin pre-init
This commit is contained in:
parent
2e81109be1
commit
9ea1428d11
44 changed files with 219 additions and 201 deletions
|
@ -116,6 +116,15 @@ void pgResetFn_compassConfig(compassConfig_t *compassConfig)
|
|||
static int16_t magADCRaw[XYZ_AXIS_COUNT];
|
||||
static uint8_t magInit = 0;
|
||||
|
||||
void compassPreInit(void)
|
||||
{
|
||||
#ifdef USE_SPI
|
||||
if (compassConfig()->mag_bustype == BUSTYPE_SPI) {
|
||||
spiPreinitRegister(compassConfig()->mag_spi_csn, IOCFG_IPU, 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(SIMULATOR_BUILD)
|
||||
bool compassDetect(magDev_t *dev)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue