uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
|
Implementation of the MIDI switcher module. More...
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <avr/io.h>
#include <avr/wdt.h>
#include <util/delay.h>
#include "lib/background_tasks.h"
#include "lib/gpio.h"
#include "lib/leds.h"
#include "lib/program.h"
#include "lib/usb.h"
#include "config.h"
#include "switcher.h"
Data Structures | |
union | program_data |
Functions | |
void | execute_program (uint32_t program_data) |
Replace current program by given program_data and update relays accordingly. More... | |
bool | exec_backup (const char *command) |
Handler for the backup command. More... | |
bool | exec_load (const char *command) |
Handler for the load command. More... | |
bool | exec_relay (const char *command) |
Handler for the relays command. More... | |
bool | exec_restore (const char *command) |
Handler for the restore command. More... | |
bool | exec_save (const char *command) |
Handler for the save command. More... | |
void | handle_program_change (uint8_t program) |
Callback for unimplemented midi messages. More... | |
void | unknown_midi_message_handler (void) |
Task for polling all switches and update current program. More... | |
void | poll_switches (void) |
Variables | |
static union program_data | current_program |
Switch configuration of the current program. More... | |
static union program_data | effective_program |
The current switch configuration. More... | |
Implementation of the MIDI switcher module.
bool exec_backup | ( | const char * | command | ) |
Handler for the backup
command.
bool exec_load | ( | const char * | command | ) |
Handler for the load
command.
bool exec_relay | ( | const char * | command | ) |
Handler for the relays
command.
bool exec_restore | ( | const char * | command | ) |
Handler for the restore
command.
bool exec_save | ( | const char * | command | ) |
Handler for the save
command.
void execute_program | ( | uint32_t | program_data | ) |
Replace current program by given program_data and update relays accordingly.
Callback for program changes
void handle_program_change | ( | uint8_t | program | ) |
Callback for unimplemented midi messages.
void poll_switches | ( | void | ) |
void unknown_midi_message_handler | ( | void | ) |
Task for polling all switches and update current program.
|
static |
Switch configuration of the current program.
|
static |
The current switch configuration.