Skip to content

Commit c2bafbf

Browse files
Steven Cartmellcmonr
authored andcommitted
Add free function to lp/us ticker HAL API
1 parent d6761a3 commit c2bafbf

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

hal/lp_ticker_api.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ void lp_ticker_irq_handler(void);
112112
*/
113113
void lp_ticker_init(void);
114114

115+
/** Deinitialize the lower power ticker
116+
*
117+
* Powerdown the lp ticker in preparation for sleep, powerdown, or reset.
118+
*
119+
* After calling this function no other ticker functions should be called except
120+
* lp_ticker_init(). Calling any function other than init after freeing is
121+
* undefined.
122+
*
123+
* @note This function stops the ticker from counting.
124+
*/
125+
void lp_ticker_free(void);
126+
115127
/** Read the current tick
116128
*
117129
* If no rollover has occurred, the seconds passed since lp_ticker_init()

hal/us_ticker_api.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,18 @@ void us_ticker_irq_handler(void);
161161
*/
162162
void us_ticker_init(void);
163163

164-
/** Read the current tick
164+
/** Deinitialize the us ticker
165+
*
166+
* Powerdown the us ticker in preparation for sleep, powerdown, or reset.
167+
*
168+
* After this function is called, no other ticker functions should be called
169+
* except us_ticker_init(), calling any function other than init is undefined.
170+
*
171+
* @note This function stops the ticker from counting.
172+
*/
173+
void us_ticker_free(void);
174+
175+
/** Read the current counter
165176
*
166177
* Read the current counter value without performing frequency conversions.
167178
* If no rollover has occurred, the seconds passed since us_ticker_init()
@@ -230,7 +241,7 @@ void us_ticker_disable_interrupt(void);
230241
void us_ticker_clear_interrupt(void);
231242

232243
/** Set pending interrupt that should be fired right away.
233-
*
244+
*
234245
* The ticker should be initialized prior calling this function.
235246
*
236247
* Pseudo Code:

0 commit comments

Comments
 (0)