1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 09:45:33 +03:00

[SPI] Lazy SPI init; Per-device SPI settings; Allow SDCARD/SPIFLASH bus sharing (init time)

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2019-04-10 23:08:58 +02:00
parent 547858a800
commit 1873c20e74
34 changed files with 88 additions and 180 deletions

View file

@ -29,6 +29,12 @@
#include "drivers/bus_spi.h"
#include "drivers/time.h"
bool spiBusInitHost(const busDevice_t * dev)
{
const bool spiLeadingEdge = (dev->flags & DEVFLAGS_SPI_MODE_0);
return spiInitDevice(dev->busdev.spi.spiBus, spiLeadingEdge);
}
void spiBusSelectDevice(const busDevice_t * dev)
{
IOLo(dev->busdev.spi.csnPin);