1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

SPI CS preinit for configurability

This commit is contained in:
jflyper 2018-05-18 17:22:58 +09:00
parent ca09a8e2fc
commit f9a43099db
22 changed files with 219 additions and 113 deletions

View file

@ -275,6 +275,17 @@ resourceOwner_e IOGetOwner(IO_t io)
return ioRec->owner;
}
bool IOIsFreeOrPreinit(IO_t io)
{
resourceOwner_e owner = IOGetOwner(io);
if (owner == OWNER_FREE || owner == OWNER_SPI_PREINIT_IPU || owner == OWNER_SPI_PREINIT_OPU) {
return true;
}
return false;
}
#if defined(STM32F1)
void IOConfigGPIO(IO_t io, ioConfig_t cfg)
@ -414,3 +425,4 @@ IO_t IOGetByTag(ioTag_t tag)
offset += ioDefUsedOffset[portIdx];
return ioRecs + offset;
}