File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ extern "C" {
73
73
* Verified by ::ticker_fire_now_test
74
74
* * The ticker operations ticker_read, ticker_clear_interrupt, ticker_set_interrupt and ticker_fire_interrupt
75
75
* take less than 20us to complete - Verified by ::ticker_speed_test
76
+ * * The function ticker_free disables the ticker interrupt - ::ticker_free_interrupt_test
77
+ * * The function ticker_init re-initializes ticker after has been disabled by means of ticker_free - Verified by ::ticker_init_free_test
76
78
*
77
79
* # Undefined behavior
78
80
* * Calling any function other than ticker_init before the initialization of the ticker
@@ -170,6 +172,25 @@ void us_ticker_init(void);
170
172
* except us_ticker_init(), calling any function other than init is undefined.
171
173
*
172
174
* @note This function stops the ticker from counting.
175
+ *
176
+ * Pseudo Code:
177
+ * @code
178
+ * uint32_t us_ticker_free()
179
+ * {
180
+ * // Disable timer
181
+ * TIMER_CTRL &= ~TIMER_CTRL_ENABLE_Msk;
182
+ *
183
+ * // Disable the compare interrupt
184
+ * TIMER_CTRL &= ~TIMER_CTRL_COMPARE_ENABLE_Msk;
185
+ *
186
+ * // Disable timer interrupt
187
+ * NVIC_DisableIRQ(TIMER_IRQn);
188
+ *
189
+ * // Disable clock gate so processor cannot read TIMER registers
190
+ * POWER_CTRL &= ~POWER_CTRL_TIMER_Msk;
191
+ * }
192
+ * @endcode
193
+ *
173
194
*/
174
195
void us_ticker_free (void );
175
196
You can’t perform that action at this time.
0 commit comments