Button Debounce Example Application main file.
More...
|
void | TIMER0_IRQHandler (void) |
| Interrupt handler function for the Timer 0 peripheral.
|
|
static void | timer0_init (void) |
| Function for initializing Timer 0.
|
|
int | main (void) |
| Function for application main entry.
|
|
This file contains the source code for a sample application using button debouncing.
Use board setup A for this example.
#define DEBOUNCE_TIME_IN_MS (50U) |
Debounce timer in milliseconds
#define DEBOUNCE_INPUT_SAMPLING_FREQ (60U) |
Input sampling frequency in Hertz
#define TIMER0_PRESCALER (9UL) |
#define MS_TO_TIMER0_TICKS |
( |
|
ms | ) |
((1000000UL * ms) / (TIMER0_CLOCK)) |
Converts milliseconds to timer ticks
Maximum number of buttons in use
uint_fast16_t timer0_cc0_period |
|
static |
Period between debouncer input reads.
Debounced button state holder