static uint8_t cmd_length = 0;
static uint8_t cmd_read_pos = 0;
-uint8_t dispatch_command(const uint8_t *, uint8_t);
+static uint8_t dispatch_command(const uint8_t *, uint8_t);
void interface_init(void)
{
}
}
-uint8_t dispatch_command(const uint8_t *cmd, uint8_t length)
+static uint8_t dispatch_command(const uint8_t *cmd, uint8_t length)
{
uint8_t type = cmd[0]>>4;
if(type==0)
#include "output.h"
#include "serial.h"
-uint16_t track_current_samples[16] = { 0 };
-uint8_t track_current_head = 0;
-volatile uint16_t track_current_sum = 0;
-uint16_t overcurrent_limit = 8796;
-uint8_t overcurrent_sent = 0;
+static uint16_t track_current_samples[16] = { 0 };
+static uint8_t track_current_head = 0;
+static volatile uint16_t track_current_sum = 0;
+static uint16_t overcurrent_limit = 8796;
+static uint8_t overcurrent_sent = 0;
-uint16_t input_voltage_samples[16] = { 0 };
-uint8_t input_voltage_head = 0;
-volatile uint16_t input_voltage_sum = 0;
+static uint16_t input_voltage_samples[16] = { 0 };
+static uint8_t input_voltage_head = 0;
+static volatile uint16_t input_voltage_sum = 0;
-volatile uint8_t adc_state = 0;
-volatile uint16_t adc_value = 0;
+static volatile uint8_t adc_state = 0;
+static volatile uint16_t adc_value = 0;
-uint16_t track_current_milliamps(void);
-uint16_t input_voltage_millivolts(void);
+static uint16_t track_current_milliamps(void);
+static uint16_t input_voltage_millivolts(void);
void monitor_init(void)
{
return COMMAND_OK;
}
-uint16_t track_current_milliamps(void)
+static uint16_t track_current_milliamps(void)
{
uint16_t value = track_current_sum;
}
}
-uint16_t input_voltage_millivolts(void)
+static uint16_t input_voltage_millivolts(void)
{
uint16_t value = input_voltage_sum;
#define DATA PIN7
#define BIT(x) (1<<(x))
-volatile uint8_t s88_read_count = 0;
-uint8_t s88_read_bit = 0;
-volatile uint8_t s88_read_phase = 0;
-uint8_t s88_data = 0;
-RINGBUFFER(s88_buffer, 8);
-uint8_t s88_out_index = 0;
+static volatile uint8_t s88_read_count = 0;
+static uint8_t s88_read_bit = 0;
+static volatile uint8_t s88_read_phase = 0;
+static uint8_t s88_data = 0;
+static RINGBUFFER(s88_buffer, 8);
+static uint8_t s88_out_index = 0;
void s88_init(void)
{