Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions
LowPowerTickerWrapper Class Reference

Public Member Functions

 LowPowerTickerWrapper (const ticker_data_t *data, const ticker_interface_t *interface, uint32_t min_cycles_between_writes, uint32_t min_cycles_until_match)
 Create a new wrapped low power ticker object. More...
 
void irq_handler (ticker_irq_handler_type handler)
 Interrupt handler called by the underlying driver/hardware. More...
 
void suspend ()
 Suspend wrapper operation and pass through interrupts. More...
 
void resume ()
 Resume wrapper operation and filter interrupts normally. More...
 
bool timeout_pending ()
 Check if a Timeout object is being used. More...
 

Detailed Description

Definition at line 30 of file LowPowerTickerWrapper.h.

Constructor & Destructor Documentation

LowPowerTickerWrapper ( const ticker_data_t data,
const ticker_interface_t interface,
uint32_t  min_cycles_between_writes,
uint32_t  min_cycles_until_match 
)

Create a new wrapped low power ticker object.

Parameters
dataLow power ticker data to wrap
interfacenew ticker interface functions
min_cycles_between_writesThe number of whole low power clock periods which must complete before subsequent calls to set_interrupt
min_cycles_until_matchThe minimum number of whole low power clock periods from the current time for which the match timestamp passed to set_interrupt is guaranteed to fire.

N = min_cycles_between_writes

 0       1             N - 1     N     N + 1   N + 2   N + 3
 |-------|------...------|-------|-------|-------|-------|
     ^                                    ^
     |                                    |
 set_interrupt                   Next set_interrupt allowed

N = min_cycles_until_match

 0       1             N - 1     N     N + 1   N + 2   N + 3
 |-------|------...------|-------|-------|-------|-------|
     ^                                   ^
     |                                   |
 set_interrupt              Earliest match timestamp allowed

Member Function Documentation

void irq_handler ( ticker_irq_handler_type  handler)

Interrupt handler called by the underlying driver/hardware.

Parameters
handlerThe callback which would normally be called by the underlying driver/hardware
void resume ( )

Resume wrapper operation and filter interrupts normally.

void suspend ( )

Suspend wrapper operation and pass through interrupts.

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.
bool timeout_pending ( )

Check if a Timeout object is being used.

Returns
true if Timeout is used for scheduling false otherwise
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.