9.19 timeout_example.c File Reference

Includes

  1. ../drivers/timeout.h
  2. timeout_example.h

Functions

uint32_t
oneshot_handler (void)

This timeout callback handler returns 0, does not reschedule the timer, so will execute only once.

Parameters:

none

Returns:

None

uint32_t
periodic_handler (void)

This timeout callback handler continuously reschedules a periodic timer to timeout with the number of ticks it returns.

Parameters:

none

Returns:

None

uint32_t
periodic_handler_payload (void *payload)

This handler executes a repeating, periodic timer that uses a payload argument.

Parameters:

payload

Type: void *

- any value that needs to be passed onto the handler.

Returns:

None

uint32_t
counter_handler (void)

This handler executes a repeating timer that counts the ticks while an event is going on.

Parameters:

none

Returns:

None

void
Timeout_example_create_sched_oneshot (void)

Call this function to run a 1000-tick timer once. The timer will not be rescheduled in the associated callback function.

Parameters:

none

Returns:

None

void
Timeout_example_create_sched_periodic (void)

Call this function to run a 1000-tick timer continuously. The callback function reschedules the timer continuously.

Parameters:

none

Returns:

None

void
Timeout_example_create_sched_periodic_with_payload (void)

Call this function to run a 1000-tick timer 10 times, with the counter sent as a payload.

Parameters:

none

Returns:

None

uint32_t
Timeout_example_stopwatch_mode (void)

Call this function to count how many timer ticks have elapsed since the start of a timer

Parameters:

Type: void

Returns: