Skip to content

Commit

Permalink
lp ticker wrapper: Add undefined behavior warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fkjagodzinski committed Oct 19, 2018
1 parent 023603f commit effabc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hal/LowPowerTickerWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class LowPowerTickerWrapper {
*
* This stops to wrapper layer from using the microsecond ticker.
* This should be called before using the low power ticker APIs directly.
*
* @warning: Make sure to suspend the LP ticker first (call ticker_suspend()),
* otherwise the behavior is undefined.
*/
void suspend();

Expand Down
3 changes: 3 additions & 0 deletions hal/mbed_lp_ticker_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const ticker_data_t *get_lp_ticker_wrapper_data(const ticker_data_t *data);
*
* Pass through all interrupts to the low power ticker and stop using
* the microsecond ticker.
*
* @warning: Make sure to suspend the LP ticker first (call ticker_suspend()),
* otherwise the behavior is undefined.
*/
void lp_ticker_wrapper_suspend(void);

Expand Down

0 comments on commit effabc5

Please sign in to comment.