Skip to content

lp ticker - fix doc for sleep and set interrupt #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mbed-hal/lp_ticker_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ uint32_t lp_ticker_read(void);

/** Set interrupt for specified time
*
* It should check if the current counter is in the valid range (now, time).
* If it is not, it should return. Assuming the range check is fine, it should set a new
* interrupt to a new_time which can be either:
* - for timers with deltas, new_time = time - current counter
* - for absolute time timers (=matching interrupt with counter running) new_time = time.
* @param now The current time
* @param time The time to be matched
*/
Expand All @@ -63,6 +68,9 @@ uint32_t lp_ticker_get_compare_match(void);

/** Set lp ticker interrupt and enter mbed sleep.
*
* This function should set sleep until time. It should check if the current counter
* is in the valid range (now, time). If it is not, it should return, otherwise invoke lp_ticker_set_interrupt
* and set sleep using mbed sleep API.
* @param now The current time
* @param time The time to be matched
*/
Expand Down