]> git.tdb.fi Git - model-railway-devices.git/commitdiff
Mark module-private variables static
authorMikko Rasa <tdb@tdb.fi>
Wed, 30 Oct 2013 21:59:50 +0000 (23:59 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 30 Oct 2013 21:59:50 +0000 (23:59 +0200)
arducontrol/interface.c
arducontrol/monitor.c
arducontrol/output.c
arducontrol/s88.c

index c5a7262d4c12199b217f0430f5ffe288c399afe6..a8ae2a28af9a0fce11cd391b5dd80da3634cf38b 100644 (file)
@@ -10,7 +10,7 @@ static uint8_t cmd_buffer[15];
 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)
 {
@@ -61,7 +61,7 @@ void interface_check(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)
index d8f3dadded7c44b73a3f449985380e04b1f29f0f..de00fc1645b9ddc1258326eadcb2a880aaeb23d9 100644 (file)
@@ -4,21 +4,21 @@
 #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)
 {
@@ -113,7 +113,7 @@ uint8_t monitor_command(const uint8_t *cmd_buf, uint8_t cmd_length)
        return COMMAND_OK;
 }
 
-uint16_t track_current_milliamps(void)
+static uint16_t track_current_milliamps(void)
 {
        uint16_t value = track_current_sum;
 
@@ -130,7 +130,7 @@ uint16_t track_current_milliamps(void)
        }
 }
 
-uint16_t input_voltage_millivolts(void)
+static uint16_t input_voltage_millivolts(void)
 {
        uint16_t value = input_voltage_sum;
 
index b862ac3f75520c9051fddb90961c511436448e61..3c94f7091c39072939829e45adff5ff1cde6d5ad 100644 (file)
@@ -8,10 +8,10 @@
 #define BIT(x) (1<<(x))
 
 OutputPacket packet;
-uint8_t out_bit;
-uint8_t out_time;
-uint8_t out_data;
-uint8_t delay_time;
+static uint8_t out_bit;
+static uint8_t out_time;
+static uint8_t out_data;
+static uint8_t delay_time;
 
 void output_init(void)
 {
index bce0a2a090bc69ddea12eb0663962ee3cf32f900..cfe536734be49a78fa7642193148822120304bcb 100644 (file)
 #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)
 {