remove spiMtx (#1907)
This commit is contained in:
parent
c64319beec
commit
946fe5091c
|
@ -71,8 +71,6 @@ EXTERN_ENGINE;
|
||||||
|
|
||||||
extern bool hasFirmwareErrorFlag;
|
extern bool hasFirmwareErrorFlag;
|
||||||
|
|
||||||
static mutex_t spiMtx;
|
|
||||||
|
|
||||||
#if HAL_USE_SPI
|
#if HAL_USE_SPI
|
||||||
extern bool isSpiInitialized[5];
|
extern bool isSpiInitialized[5];
|
||||||
|
|
||||||
|
@ -85,14 +83,12 @@ bool rtcWorks = true;
|
||||||
* Only one consumer can use SPI bus at a given time
|
* Only one consumer can use SPI bus at a given time
|
||||||
*/
|
*/
|
||||||
void lockSpi(spi_device_e device) {
|
void lockSpi(spi_device_e device) {
|
||||||
UNUSED(device);
|
|
||||||
efiAssertVoid(CUSTOM_STACK_SPI, getCurrentRemainingStack() > 128, "lockSpi");
|
efiAssertVoid(CUSTOM_STACK_SPI, getCurrentRemainingStack() > 128, "lockSpi");
|
||||||
// todo: different locks for different SPI devices!
|
spiAcquireBus(getSpiDevice(device));
|
||||||
chMtxLock(&spiMtx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void unlockSpi(spi_device_e device) {
|
void unlockSpi(spi_device_e device) {
|
||||||
chMtxUnlock(&spiMtx);
|
spiReleaseBus(getSpiDevice(device));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void initSpiModules(engine_configuration_s *engineConfiguration) {
|
static void initSpiModules(engine_configuration_s *engineConfiguration) {
|
||||||
|
@ -451,8 +447,6 @@ void initHardware(Logging *l) {
|
||||||
// 10 extra seconds to re-flash the chip
|
// 10 extra seconds to re-flash the chip
|
||||||
//flashProtect();
|
//flashProtect();
|
||||||
|
|
||||||
chMtxObjectInit(&spiMtx);
|
|
||||||
|
|
||||||
#if EFI_HISTOGRAMS
|
#if EFI_HISTOGRAMS
|
||||||
/**
|
/**
|
||||||
* histograms is a data structure for CPU monitor, it does not depend on configuration
|
* histograms is a data structure for CPU monitor, it does not depend on configuration
|
||||||
|
|
Loading…
Reference in New Issue