Embed: (wiki syntax)

« Back to documentation index

Low Power Ticker Functions

Low Power Ticker Functions
[Hal]

Functions

ticker_irq_handler_type set_lp_ticker_irq_handler (ticker_irq_handler_type ticker_irq_handler)
 Set low power ticker IRQ handler.
const ticker_data_tget_lp_ticker_data (void)
 Get low power ticker's data.
void lp_ticker_irq_handler (void)
 The wrapper for ticker_irq_handler, to pass lp ticker's data.
void lp_ticker_init (void)
 Initialize the low power ticker.
uint32_t lp_ticker_read (void)
 Read the current counter.
void lp_ticker_set_interrupt (timestamp_t timestamp)
 Set interrupt for specified timestamp.
void lp_ticker_disable_interrupt (void)
 Disable low power ticker interrupt.
void lp_ticker_clear_interrupt (void)
 Clear the low power ticker interrupt.
void lp_ticker_fire_interrupt (void)
 Set pending interrupt that should be fired right away.
const ticker_info_tlp_ticker_get_info (void)
 Get frequency and counter bits of this ticker.

Function Documentation

const ticker_data_t* get_lp_ticker_data ( void   )

Get low power ticker's data.

Returns:
The low power ticker data

Definition at line 39 of file mbed_lp_ticker_api.c.

void lp_ticker_clear_interrupt ( void   )

Clear the low power ticker interrupt.

void lp_ticker_disable_interrupt ( void   )

Disable low power ticker interrupt.

void lp_ticker_fire_interrupt ( void   )

Set pending interrupt that should be fired right away.

The ticker should be initialized prior calling this function.

const ticker_info_t* lp_ticker_get_info ( void   )

Get frequency and counter bits of this ticker.

void lp_ticker_init ( void   )

Initialize the low power ticker.

void lp_ticker_irq_handler ( void   )

The wrapper for ticker_irq_handler, to pass lp ticker's data.

Definition at line 53 of file mbed_lp_ticker_api.c.

uint32_t lp_ticker_read ( void   )

Read the current counter.

Returns:
The current timer's counter value in microseconds
void lp_ticker_set_interrupt ( timestamp_t  timestamp )

Set interrupt for specified timestamp.

Parameters:
timestampThe time in microseconds to be set
ticker_irq_handler_type set_lp_ticker_irq_handler ( ticker_irq_handler_type  ticker_irq_handler )

Set low power ticker IRQ handler.

Parameters:
ticker_irq_handlerIRQ handler to be connected
Returns:
previous ticker IRQ handler
Note:
by default IRQ handler is set to ticker_irq_handler()
this function is primarily for testing purposes and it's not required part of HAL implementation

Definition at line 44 of file mbed_lp_ticker_api.c.