summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2019-02-25 18:30:08 -0700
committerBdale Garbee <bdale@gag.com>2019-02-25 18:30:08 -0700
commit338372b97d441c30d2a23df540163a66a7f8d8c0 (patch)
tree65544591dbc34d449af0f7fd6c0c0eb4cb075f6b /src/kernel
parent8d0df64bbc5ed31188b4b4bea0be52a52dbece3b (diff)
parentcd920a0e5321166ef8b1d6afc3d63fc5de998a93 (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/ao.h8
-rw-r--r--src/kernel/ao_led.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/kernel/ao.h b/src/kernel/ao.h
index 910c1d8e..dddcd9cb 100644
--- a/src/kernel/ao.h
+++ b/src/kernel/ao.h
@@ -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;
@@ -117,6 +117,10 @@ extern volatile AO_TICK_TYPE ao_tick_count;
AO_TICK_TYPE
ao_time(void);
+/* Returns the current time in ns */
+uint64_t
+ao_time_ns(void);
+
/* Suspend the current task until ticks time has passed */
void
ao_delay(uint16_t ticks);
diff --git a/src/kernel/ao_led.h b/src/kernel/ao_led.h
index 5d982ca6..b770381f 100644
--- a/src/kernel/ao_led.h
+++ b/src/kernel/ao_led.h
@@ -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