Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Embed: (wiki syntax)

« Back to documentation index

Ticker HAL functions

Ticker HAL functions
[Hal]

Functions

void ticker_set_handler (const ticker_data_t *const data, ticker_event_handler handler)
 Initialize a ticker and set the event handler.
void ticker_irq_handler (const ticker_data_t *const data)
 IRQ handler that goes through the events to trigger overdue events.
void ticker_remove_event (const ticker_data_t *const data, ticker_event_t *obj)
 Remove an event from the queue.
void ticker_insert_event (const ticker_data_t *const data, ticker_event_t *obj, timestamp_t timestamp, uint32_t id)
 Insert an event to the queue.
timestamp_t ticker_read (const ticker_data_t *const data)
 Read the current ticker's timestamp.
int ticker_get_next_timestamp (const ticker_data_t *const data, timestamp_t *timestamp)
 Read the next event's timestamp.

Function Documentation

int ticker_get_next_timestamp ( const ticker_data_t *const   data,
timestamp_t *  timestamp 
)

Read the next event's timestamp.

Parameters:
dataThe ticker's data
Returns:
1 if timestamp is pending event, 0 if there's no event pending

Definition at line 124 of file mbed_ticker_api.c.

void ticker_insert_event ( const ticker_data_t *const   data,
ticker_event_t obj,
timestamp_t  timestamp,
uint32_t  id 
)

Insert an event to the queue.

Parameters:
dataThe ticker's data
objThe event object to be inserted to the queue
timestampThe event's timestamp
idThe event object

Definition at line 56 of file mbed_ticker_api.c.

void ticker_irq_handler ( const ticker_data_t *const   data )

IRQ handler that goes through the events to trigger overdue events.

Parameters:
dataThe ticker's data

Definition at line 26 of file mbed_ticker_api.c.

timestamp_t ticker_read ( const ticker_data_t *const   data )

Read the current ticker's timestamp.

Parameters:
dataThe ticker's data
Returns:
The current timestamp

Definition at line 119 of file mbed_ticker_api.c.

void ticker_remove_event ( const ticker_data_t *const   data,
ticker_event_t obj 
)

Remove an event from the queue.

Parameters:
dataThe ticker's data
objThe event object to be removed from the queue

Definition at line 92 of file mbed_ticker_api.c.

void ticker_set_handler ( const ticker_data_t *const   data,
ticker_event_handler  handler 
)

Initialize a ticker and set the event handler.

Parameters:
dataThe ticker's data
handlerA handler to be set

Definition at line 20 of file mbed_ticker_api.c.