diff options
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/ao.h | 8 | ||||
-rw-r--r-- | src/kernel/ao_led.h | 4 |
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 |