Changeset 10677 for firmware/FSC/src/application.c
- Timestamp:
- 05/12/11 17:47:17 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FSC/src/application.c
r10667 r10677 139 139 U08 increase_adc (U08 channel){ 140 140 U08 effective_channel; 141 for ( U08 increase = 1 ; increase <= V _CHANNELS + I_CHANNELS + H_CHANNELS; increase++)142 { 143 effective_channel = (channel + increase) % (V _CHANNELS + I_CHANNELS + H_CHANNELS);141 for ( U08 increase = 1 ; increase <= VOLTAGE_CHANNELS; increase++) 142 { 143 effective_channel = (channel + increase) % (VOLTAGE_CHANNELS); 144 144 if (adc_enables[effective_channel/8] & (1<<effective_channel%8)) 145 145 return effective_channel; … … 150 150 U08 increase_ad7719 (U08 channel){ 151 151 U08 effective_channel; 152 for ( U08 increase = 1 ; increase <= TEMP_CHANNELS; increase++)153 { 154 effective_channel = (channel + increase) % ( TEMP_CHANNELS);152 for ( U08 increase = 1 ; increase <= RESISTANCE_CHANNELS; increase++) 153 { 154 effective_channel = (channel + increase) % (RESISTANCE_CHANNELS); 155 155 if (ad7719_enables[effective_channel/8] & (1<<effective_channel%8)) 156 156 return effective_channel; … … 161 161 void check_if_measured_all() { 162 162 adc_measured_all = true; 163 for ( U08 i=0; i< V_BITMAP + I_BITMAP + H_BITMAP; ++i ) {163 for ( U08 i=0; i<(VOLTAGE_CHANNELS/8); ++i ) { 164 164 if ((adc_enables[i] ^ adc_channels_ready[i]) != 0x00) { 165 165 adc_measured_all = false; … … 168 168 } 169 169 ad7719_measured_all = true; 170 for ( U08 i=0; i< CHANNEL_BITMAP; ++i ) {170 for ( U08 i=0; i<(RESISTANCE_CHANNELS/8); ++i ) { 171 171 if ((ad7719_enables[i] ^ ad7719_channels_ready[i]) != 0x00) { 172 172 ad7719_measured_all = false; … … 177 177 178 178 } 179 180 181 bool check_if_adc_measurement_done(){ 182 adc_measured_all = true; 183 for ( U08 i=0; i<VOLTAGE_CHANNELS/8; ++i ) { 184 if ((adc_enables[i] ^ adc_channels_ready[i]) != 0x00) { 185 adc_measured_all = false; 186 break; 187 } 188 } 189 return adc_measured_all; 190 } 191 192 bool check_if_ad7719_measurement_done(){ 193 ad7719_measured_all = true; 194 for ( U08 i=0; i<RESISTANCE_CHANNELS/8; ++i ) { 195 if ((ad7719_enables[i] ^ ad7719_channels_ready[i]) != 0x00) { 196 ad7719_measured_all = false; 197 break; 198 } 199 } 200 return ad7719_measured_all; 201 }
Note:
See TracChangeset
for help on using the changeset viewer.