megaAVR Timer/Counter (TC) Timeout Driver defines
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | TC_TIMEOUT_CLK_PER_TICK (CONFIG_TC_TIMEOUT_CLOCK_SOURCE_HZ / CONFIG_TC_TIMEOUT_TICK_HZ) |
Number of clocks per tick. More... | |
#define | TC_TIMEOUT_COMP (TC_TIMEOUT_CLK_PER_TICK / TC_TIMEOUT_PRESCALER - 1) |
Comparator value. More... | |
#define | TC_TIMEOUT_COMP 0 |
Comparator value. More... | |
#define | TC_TIMEOUT_PRESCALER 1 |
Prescaler value. More... | |
#define | TC_TIMEOUT_PRESCALER_MASK (1 << CS20) |
Prescaler mask bits. More... | |
#define | TC_TIMEOUT_TICK_HZ |
Actual TC timeout tick rate. More... | |
Typedefs | |
typedef uint8_t | tc_timeout_id_t |
Timeout identifier. More... | |
Functions | |
void | tc_timeout_init (void) |
Initialize TC timeout. More... | |
void | tc_timeout_start_offset (tc_timeout_id_t id, uint16_t period, uint16_t start_offset) |
Start periodic timeout with a specific start timeout. More... | |
void | tc_timeout_start_periodic (tc_timeout_id_t id, uint16_t period) |
Start periodic timeout. More... | |
void | tc_timeout_start_singleshot (tc_timeout_id_t id, uint16_t timeout) |
Start singleshot timeout. More... | |
void | tc_timeout_stop (tc_timeout_id_t id) |
Stop running timeout. More... | |
bool | tc_timeout_test_and_clear_expired (tc_timeout_id_t id) |
Test and clear expired flag for running timeout. More... | |