This commit is contained in:
cfif 2026-04-23 12:19:51 +03:00
parent fc93dbfc10
commit 0f3b615fc7
1 changed files with 16 additions and 0 deletions

View File

@ -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; return false;