This commit is contained in:
cfif 2026-04-01 17:58:36 +03:00
parent b765804741
commit a2853dfda7
1 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ bool setSpiSensor(tSensorSPI *env, tSensorType sensorType, tSensorAdr sensorAdr,
GpioPinSet(&env->conns->COON_A_B9_B10.En1, true); GpioPinSet(&env->conns->COON_A_B9_B10.En1, true);
GpioPinSet(&env->conns->COON_A_B9_B10.En2, true); GpioPinSet(&env->conns->COON_A_B9_B10.En2, true);
Delay(1); Delay(1000);
if (sensorAdr >= SENSOR_ADR_9) { if (sensorAdr >= SENSOR_ADR_9) {
setSensorTypeAdr(env, &env->conns->COON_A_B9_B10.Con, sensorAdr - 8); setSensorTypeAdr(env, &env->conns->COON_A_B9_B10.Con, sensorAdr - 8);
@ -84,16 +84,16 @@ bool setSpiSensor(tSensorSPI *env, tSensorType sensorType, tSensorAdr sensorAdr,
GpioPinSet(&env->conns->COON_A_B9_B10.En2, true); GpioPinSet(&env->conns->COON_A_B9_B10.En2, true);
} }
Delay(1); Delay(1000);
bool result = SpiPortTransmit(&env->spiPorts->Spi1_IO, &data, 1000); bool result = SpiPortTransmit(&env->spiPorts->Spi1_IO, &data, 1000);
Delay(1); Delay(1000);
GpioPinSet(&env->conns->COON_A_B9_B10.En1, true); GpioPinSet(&env->conns->COON_A_B9_B10.En1, true);
GpioPinSet(&env->conns->COON_A_B9_B10.En2, true); GpioPinSet(&env->conns->COON_A_B9_B10.En2, true);
Delay(1); Delay(1000);
return result; return result;
} }