Skip to content

Commit effabc5

Browse files
author
Filip Jagodzinski
committed
lp ticker wrapper: Add undefined behavior warning
1 parent 023603f commit effabc5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

hal/LowPowerTickerWrapper.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ class LowPowerTickerWrapper {
7474
*
7575
* This stops to wrapper layer from using the microsecond ticker.
7676
* This should be called before using the low power ticker APIs directly.
77+
*
78+
* @warning: Make sure to suspend the LP ticker first (call ticker_suspend()),
79+
* otherwise the behavior is undefined.
7780
*/
7881
void suspend();
7982

hal/mbed_lp_ticker_wrapper.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ const ticker_data_t *get_lp_ticker_wrapper_data(const ticker_data_t *data);
5353
*
5454
* Pass through all interrupts to the low power ticker and stop using
5555
* the microsecond ticker.
56+
*
57+
* @warning: Make sure to suspend the LP ticker first (call ticker_suspend()),
58+
* otherwise the behavior is undefined.
5659
*/
5760
void lp_ticker_wrapper_suspend(void);
5861

0 commit comments

Comments
 (0)