v2.0.0
Functions
pico_aon_timer
High Level APIs

High Level "Always on Timer" Abstraction. More...

## Functions
void | aon_timer_start_with_timeofday (void)
| Start the AON timer running using the result from the gettimeofday() function as the current time.
void | aon_timer_start (const struct timespec *ts)
| Start the AON timer running using the specified timespec as the current time. More...
void | aon_timer_stop (void)
| Stop the AON timer.
void | aon_timer_set_time (const struct timespec *ts)
| Update the current time of the AON timer. More...
void | aon_timer_get_time (struct timespec *ts)
| Get the current time of the AON timer. More...
void | aon_timer_get_resolution (struct timespec *ts)
| Get the resolution of the AON timer. More...
aon_timer_alarm_handler_t | aon_timer_enable_alarm (const struct timespec *ts, aon_timer_alarm_handler_t handler, bool wakeup_from_low_power)
| Enable an AON timer alarm for a specifed time. More...
void | aon_timer_disable_alarm (void)
| Disable the currently enabled AON timer alarm if any.
bool | aon_timer_is_running (void)
| Disable the currently enabled AON timer alarm if any. More...

## Detailed Description

High Level "Always on Timer" Abstraction.

This library uses the RTC on RP2040. This library uses the RTC on RP2350.

## Function Documentation

## ◆ aon_timer_enable_alarm()

aon_timer_alarm_handler_t aon_timer_enable_alarm | ( | const struct timespec * | ts,
|  | aon_timer_alarm_handler_t | handler,
|  | bool | wakeup_from_low_power
| ) |  |

Enable an AON timer alarm for a specifed time.

On RP2040 The alarm will not fire if it is in the past On RP2040 The alarm will fire if it is in the past

Parameters

  ts | the alarm time
  handler | a callback to call when the timer fires (may be NULL for wakeup_from_low_power = true)
  wakeup_from_low_power | true if the AON timer is to be used to wake up from a DORMANT state

## ◆ aon_timer_get_resolution()

void aon_timer_get_resolution | ( | struct timespec * | ts | ) |

Get the resolution of the AON timer.

Parameters

  ts | out value for the resolution of the AON timer

## ◆ aon_timer_get_time()

void aon_timer_get_time | ( | struct timespec * | ts | ) |

Get the current time of the AON timer.

Parameters

  ts | out value for the current time

## ◆ aon_timer_is_running()

bool aon_timer_is_running | ( | void |  | ) |

Disable the currently enabled AON timer alarm if any.

Returns
  true if the AON timer is running

## ◆ aon_timer_set_time()

void aon_timer_set_time | ( | const struct timespec * | ts | ) |

Update the current time of the AON timer.

Parameters

  ts | the new current time

## ◆ aon_timer_start()

void aon_timer_start | ( | const struct timespec * | ts | ) |

Start the AON timer running using the specified timespec as the current time.

Parameters

  ts | the current time