Init
This commit is contained in:
parent
b765804741
commit
a2853dfda7
|
|
@ -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.En2, true);
|
||||
Delay(1);
|
||||
Delay(1000);
|
||||
|
||||
if (sensorAdr >= SENSOR_ADR_9) {
|
||||
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);
|
||||
}
|
||||
|
||||
Delay(1);
|
||||
Delay(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.En2, true);
|
||||
|
||||
Delay(1);
|
||||
Delay(1000);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue