uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
switcher.h
Go to the documentation of this file.
1 
4 /*
5  * Copyright 2016 Simon Gansen
6  *
7  * This file is part of the uMIDI firmware.
8  *
9  * The MIDI volume controller firmware is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * The uMIDI firmware is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with the uMIDI firmware. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef _APP_H
24 #define _APP_H
25 
26 
27 //---------------- includes ----------------//
28 
29 
30 //---------------- constants ----------------//
31 
32 
33 //---------------- data types ----------------//
34 
35 
36 //---------------- functions and procedures ----------------//
38 bool exec_backup(const char* command);
39 
41 bool exec_load(const char* command);
42 
44 bool exec_relay(const char* command);
45 
47 bool exec_restore(const char* command);
48 
50 bool exec_save(const char* command);
51 
53 void execute_program(uint32_t program_data);
54 
56 void handle_program_change(uint8_t program);
57 
60 
62 void poll_switches(void);
63 
64 //---------------- EOF ----------------//
65 #endif // _APP_H
66 
bool exec_relay(const char *command)
Handler for the relays command.
Definition: switcher.c:119
Data structure for program information.
Definition: program.h:64
bool exec_save(const char *command)
Handler for the save command.
Definition: switcher.c:214
bool exec_load(const char *command)
Handler for the load command.
Definition: switcher.c:106
void execute_program(uint32_t program_data)
Replace current program by given program_data and update relays accordingly.
Definition: switcher.c:74
void poll_switches(void)
Definition: switcher.c:247
void handle_program_change(uint8_t program)
Callback for unimplemented midi messages.
Definition: switcher.c:226
void unknown_midi_message_handler(void)
Task for polling all switches and update current program.
Definition: switcher.c:241
bool exec_restore(const char *command)
Handler for the restore command.
Definition: switcher.c:198
bool exec_backup(const char *command)
Handler for the backup command.
Definition: switcher.c:92
Definition: switcher.c:45