From 0f3b615fc7075e323ca4c60119f2491a9f25af1c Mon Sep 17 00:00:00 2001 From: cfif Date: Thu, 23 Apr 2026 12:19:51 +0300 Subject: [PATCH] Init --- SensorSPI.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SensorSPI.c b/SensorSPI.c index 73586d9..562fe02 100644 --- a/SensorSPI.c +++ b/SensorSPI.c @@ -261,6 +261,22 @@ bool setSpiSensor(tSensorSPI *env, tSensorType sensorType, tSensorAdr sensorAdr, } + case SENSOR_TYPE_C: { + + GpioPinSet(&env->conns->COON_C.En1, false); // CS En1 + + setSensorTypeAdr(env, &env->conns->COON_C.Con, sensorAdr); + + Delay(DelayCn); + bool result = SpiPortTransmit(&env->spiPorts->Spi2_IO, &data, 1000); + Delay(DelayCn); + + GpioPinSet(&env->conns->COON_C.En1, true); + + Delay(DelayCn); + return result; + } + } return false;