9.11 rtcounter_example.c File Reference

Includes

  1. stddef.h
  2. ../rtcounter.h
  3. rtcounter_example.h

Functions

uint32_t
rtc_oneshot_handler (void)

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

Parameters:

none

Returns:

None

uint32_t
rtc_periodic_handler (void)

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

Parameters:

none

Returns:

None

uint32_t
rtc_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
rtc_counter_handler (void)

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

Parameters:

none

Returns:

None

void
rtc_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
rtc_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
rtc_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
rtc_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: