altos: Fix several mis-specified time types
authorKeith Packard <keithp@keithp.com>
Mon, 25 Feb 2019 23:40:16 +0000 (16:40 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 25 Feb 2019 23:40:16 +0000 (16:40 -0700)
Make sure AO_TICK_TYPE is used "everywhere", instead of uint16_t or other.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/attiny/ao_clock.c
src/kernel/ao_led.h
src/lpc/ao_arch.h
src/lpc/ao_led_lpc.c
src/lpc/ao_timer_lpc.c
src/stm/ao_arch.h
src/stm/ao_led_stm.c
src/stmf0/ao_arch.h

index d722d568d75da0e23e759b26231d3c185822bde9..2ac0500b217f307466fd8be143eae566969eac89 100644 (file)
@@ -28,7 +28,7 @@ ISR(TIMER1_COMPA_vect)
                ao_wakeup((void *) &ao_tick_count);
 }
 
-uint16_t
+AO_TICK_TYPE
 ao_time(void)
 {
        uint16_t        r;
index 5d982ca6d1f0e7101467d072ce215678e8ae8793..b770381f7efb8aea3dcb379a5cb0981800788328 100644 (file)
@@ -43,7 +43,7 @@ ao_led_set(AO_LED_TYPE colors);
 
 /* Set all LEDs in 'mask' to the specified state */
 void
-ao_led_set_mask(uint8_t colors, uint8_t mask);
+ao_led_set_mask(AO_LED_TYPE colors, AO_LED_TYPE mask);
 
 /* Toggle the specified LEDs */
 void
@@ -51,7 +51,7 @@ ao_led_toggle(AO_LED_TYPE colors);
 
 /* Turn on the specified LEDs for the indicated interval */
 void
-ao_led_for(AO_LED_TYPE colors, uint16_t ticks);
+ao_led_for(AO_LED_TYPE colors, AO_TICK_TYPE ticks);
 
 /* Initialize the LEDs */
 void
index 7821839e12d200e87c350a9149fb23dee16cb591..93676b860ff6c9edfb79804805307f288fd67c75 100644 (file)
 
 #define AO_LED_TYPE    AO_PORT_TYPE
 
-#ifndef AO_TICK_TYPE
-#define AO_TICK_TYPE   uint16_t
-#define AO_TICK_SIGNED int16_t
-#endif
-
 /* Various definitions to make GCC look more like SDCC */
 
 #define ao_arch_naked_declare  __attribute__((naked))
index 3a2d4c9886986b72889c50a07c0d13a0ba937cde..46bf0495988dfa82446ab7a49cb8b43cd4cdbc15 100644 (file)
@@ -49,7 +49,7 @@ ao_led_toggle(AO_PORT_TYPE colors)
 }
 
 void
-ao_led_for(AO_PORT_TYPE colors, uint16_t ticks) 
+ao_led_for(AO_PORT_TYPE colors, AO_TICK_TYPE ticks) 
 {
        ao_led_on(colors);
        ao_delay(ticks);
index 8999c7acf1af925e67d17125320644f503811eae..5031333301e1fe61f5911a32fe581f41c58f9ed3 100644 (file)
@@ -20,7 +20,7 @@
 
 volatile AO_TICK_TYPE ao_tick_count;
 
-uint16_t
+AO_TICK_TYPE
 ao_time(void)
 {
        return ao_tick_count;
index c95c7cd5eda860ee26ca2421c8ab9c7bbbba26ea..e83b6bd2cfbf3e1dac4a7c2816703fcf1214ba08 100644 (file)
 #define AO_STACK_SIZE  512
 #endif
 
-#ifndef AO_TICK_TYPE
-#define AO_TICK_TYPE   uint16_t
-#define AO_TICK_SIGNED int16_t
-#endif
-
 #define AO_PORT_TYPE   uint16_t
 
 /* Various definitions to make GCC look more like SDCC */
index 7dcbb661b8a65899860d895025fa8639c99e22e8..ed4ec1610de3dde8e645725d851231a4b1051671 100644 (file)
@@ -87,7 +87,7 @@ ao_led_toggle(AO_LED_TYPE colors)
 }
 
 void
-ao_led_for(AO_LED_TYPE colors, AO_LED_TYPE ticks) 
+ao_led_for(AO_LED_TYPE colors, AO_TICK_TYPE ticks) 
 {
        ao_led_on(colors);
        ao_delay(ticks);
index e5f7e1f7be2677e3130979855a044d0ff9241e35..d70a9110e91fa02ac481ced1e928fa1868b0ca6d 100644 (file)
 
 #define AO_LED_TYPE    uint16_t
 
-#ifndef AO_TICK_TYPE
-#define AO_TICK_TYPE   uint16_t
-#define AO_TICK_SIGNED int16_t
-#endif
-
 #define AO_PORT_TYPE   uint16_t
 
 /* Various definitions to make GCC look more like SDCC */