megaAVR Timer/Counter (TC) Timeout Driver Example 1
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | LED0_MASK (1 << 0) |
#define | LED1_MASK (1 << 1) |
Enumerations | |
enum | { EXAMPLE_TIMEOUT_SLOW, EXAMPLE_TIMEOUT_FAST } |
Functions | |
int | main (void) |
static void | toggle_led (uint8_t mask) |
Toggle LED. More... | |
#define LED0_MASK (1 << 0) |
Referenced by main().
#define LED1_MASK (1 << 1) |
Referenced by main().
int main | ( | void | ) |
|
inlinestatic |
Toggle LED.
Newer megaAVR devices can toggle a I/O pin by writing to PIN register, while on older ones this needs to be done by a read-modify-write operation. This function abstract these differences.
mask | Mask of port LEDs to toggle |
Referenced by main().