altos: Change default time type to 32-bits
authorKeith Packard <keithp@keithp.com>
Mon, 25 Feb 2019 23:41:45 +0000 (16:41 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 25 Feb 2019 23:41:45 +0000 (16:41 -0700)
Offers additional range for internal use without increasing cost on
32-bit platforms.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/attiny/ao_arch.h
src/kernel/ao.h

index dfd41af..5550eb4 100644 (file)
 
 #define AO_LED_TYPE    uint8_t
 
+#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 910c1d8..c00de1f 100644 (file)
@@ -100,8 +100,8 @@ extern AO_ROMCONFIG_SYMBOL uint32_t ao_radio_cal;
  */
 
 #ifndef AO_TICK_TYPE
-#define AO_TICK_TYPE   uint16_t
-#define AO_TICK_SIGNED int16_t
+#define AO_TICK_TYPE   uint32_t
+#define AO_TICK_SIGNED int32_t
 #endif
 
 extern volatile AO_TICK_TYPE ao_tick_count;