|
uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
|
Handling of the on-board LEDs. More...


Go to the source code of this file.
Data Structures | |
| struct | led_state |
| Internal state of an LED. More... | |
| struct | led |
| Enumeration for the on-board LEDs. More... | |
Macros | |
| #define | LED_GREEN led_green |
| TODO: This macro is only for compatibility and should be removed in the future. More... | |
| #define | LED_RED led_red |
| TODO: This macro is only for compatibility and should be removed in the future. More... | |
Enumerations | |
| enum | led_mode { LED_STATIC, LED_FLASH, LED_BLINK } |
| Enumeration for the LED mode. More... | |
Functions | |
| void | init_leds_module (void) |
| Module initialization procedure. More... | |
| void | register_led (struct led *const) |
| Add an LED to the cyclic processed LEDs. More... | |
| void | blink_led (struct led *led, uint8_t prescaler) |
| Lets an LED blink in a fixed interval. More... | |
| void | flash_led (struct led *led) |
| Briefly flashes an LED. More... | |
| void | flash_led_multiple (struct led *led, uint8_t count) |
| Briefly flashes an LED. More... | |
| void | set_led (struct led *led, bool enable) |
| Enables or disables an LED. More... | |
| void | toggle_led (struct led *led) |
| Toggles an LED. More... | |
| void | update_leds (void) |
| State machine task that updates the LEDs. More... | |
Variables | |
| struct led * | led_red |
| The green onboard LED. More... | |
| struct led * | led_green |
| The green onboard LED. More... | |
Handling of the on-board LEDs.
| #define LED_GREEN led_green |
TODO: This macro is only for compatibility and should be removed in the future.
| #define LED_RED led_red |
TODO: This macro is only for compatibility and should be removed in the future.
| enum led_mode |
| void blink_led | ( | struct led * | led, |
| uint8_t | prescaler | ||
| ) |
Lets an LED blink in a fixed interval.
The prescaler parameter controls the blinking frequency: Every prescaler th time the update_leds procedure is called, the LED is toggled.
| led | the LED that should blink |
| prescaler | controls the blinking frequency |
| void flash_led | ( | struct led * | led | ) |
| void flash_led_multiple | ( | struct led * | led, |
| uint8_t | count | ||
| ) |
Briefly flashes an LED.
| led | the LED that should flash |
| count | the LED will flash this many times |
| void init_leds_module | ( | void | ) |
Module initialization procedure.
Writes relevant AVR GPIO configuration for the onboard LEDs
| void register_led | ( | struct led * | const | ) |
Add an LED to the cyclic processed LEDs.
Writes relevant AVR GPIO configuration for the given LEDs and adds the given pointer that contains the corresponding gpio_pin
| void set_led | ( | struct led * | led, |
| bool | enable | ||
| ) |
Enables or disables an LED.
| led | the LED that should be enabled/disabled |
| enable | true switches the LED on; false swithes off |
| void toggle_led | ( | struct led * | led | ) |
| void update_leds | ( | void | ) |
State machine task that updates the LEDs.
This task must be included in the state machine tasks for the blink and flash modes to work.
| struct led* led_green |
The green onboard LED.
| struct led* led_red |
The green onboard LED.
1.8.13