Lines Matching refs:battery
83 #define ADC_CHANNEL_BATTERY 3 /* main battery */
84 #define ADC_CHANNEL_BACKUP 4 /* backup battery - we don't report it */
88 * Empirical range of battery values.
292 int battery, state;
307 battery = j6x0pwr_get_battery();
308 if (battery < J6X0PWR_BATTERY_CRITICAL)
310 else if (battery < J6X0PWR_BATTERY_LOW)
325 battery = j6x0pwr_get_battery();
326 if (battery > J6X0PWR_BATTERY_FULL)
329 state = 100 * (battery - J6X0PWR_BATTERY_MIN)
344 int battery;
351 battery = adc_sample_channel(ADC_CHANNEL_BATTERY);
354 return battery;