comparison Small_CPU/Src/externalInterface.c @ 581:011d8f9f5ddb

Added ex Interface measurement restart in case of i2c disturbance: Just to make sure that, in case of a i2c problem, the measurement is restarted.
author Ideenmodellierer
date Sat, 12 Dec 2020 19:18:57 +0100
parents 84a4e1200726
children 1b995079c045
comparison
equal deleted inserted replaced
580:08af5d707c5a 581:011d8f9f5ddb
109 externalInterface_StartConversion(activeChannel); 109 externalInterface_StartConversion(activeChannel);
110 timeoutCnt = 0; 110 timeoutCnt = 0;
111 } 111 }
112 } 112 }
113 } 113 }
114 else /* take also i2c bus disturb into account */
115 {
116 if(timeoutCnt++ >= ADC_TIMEOUT)
117 {
118 externalInterface_StartConversion(activeChannel);
119 timeoutCnt = 0;
120 }
121 }
114 } 122 }
115 return retval; 123 return retval;
116 } 124 }
117 float externalInterface_CalculateADCValue(uint8_t channel) 125 float externalInterface_CalculateADCValue(uint8_t channel)
118 { 126 {