static volatile uint8_t adc_state = 0;
static volatile uint16_t adc_value = 0;
-static uint16_t track_current_milliamps(void);
-static uint16_t input_voltage_millivolts(void);
-
void monitor_init(void)
{
DDRB |= 0x02;
if(cmd_length!=1)
return LENGTH_ERROR;
- uint16_t value = track_current_milliamps();
+ uint16_t value = monitor_track_current();
uint8_t reply[3];
reply[0] = TRACK_CURRENT;
reply[1] = value>>8;
if(cmd_length!=1)
return LENGTH_ERROR;
- uint16_t value = input_voltage_millivolts();
+ uint16_t value = monitor_input_voltage();
uint8_t reply[3];
reply[0] = INPUT_VOLTAGE;
reply[1] = value>>8;
return COMMAND_OK;
}
-static uint16_t track_current_milliamps(void)
+uint16_t monitor_track_current(void)
{
uint16_t value = track_current_sum;
}
}
-static uint16_t input_voltage_millivolts(void)
+uint16_t monitor_input_voltage(void)
{
uint16_t value = input_voltage_sum;
void monitor_init(void);
void monitor_check(void);
+uint16_t monitor_track_current(void);
+uint16_t monitor_input_voltage(void);
uint8_t monitor_command(const uint8_t *, uint8_t);
#endif