diff --git a/SensorSPI.c b/SensorSPI.c index 22725fc..1e5e7ab 100644 --- a/SensorSPI.c +++ b/SensorSPI.c @@ -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; }