*** empty log message ***

This commit is contained in:
Antoine Drouin
2008-04-17 08:03:09 +00:00
parent 1ada03c021
commit ddafdd0464
2 changed files with 6 additions and 7 deletions
+4 -5
View File
@@ -60,16 +60,15 @@
#endif
/* battery on AD1.7 */
#define ADC_BAT AdcBank1(7)
#ifdef USE_ADC_BAT
#define ADC_CHANNEL_VSUPPLY AdcBank1(7)
#ifndef USE_AD1
#define USE_AD1
#endif
#define USE_AD1_7
#ifndef VoltageOfAdc
#define VoltageOfAdc(adc) (0.004295*adc)
#endif
#endif /* CONFIG_BOOZ_H */
+2 -2
View File
@@ -8,9 +8,9 @@ uint8_t booz_energy_bat;
static struct adc_buf bat_adc_buf;
void booz_energy_init( void ) {
adc_buf_channel(ADC_BAT, &bat_adc_buf, DEFAULT_AV_NB_SAMPLE);
adc_buf_channel(ADC_CHANNEL_VSUPPLY, &bat_adc_buf, DEFAULT_AV_NB_SAMPLE);
}
void booz_energy_periodic( void ) {
booz_energy_bat = bat_adc_buf.sum * 0.004295;
booz_energy_bat = VoltageOfAdc(bat_adc_buf.sum);
}