Simple USB-MIDI foot controller
Dependencies: PinDetect USBDevice_STM32F103 mbed-STM32F103C8T6
Diff: midiswitch.h
- Revision:
- 6:2f804d29cbb0
- Parent:
- 3:8b8cb5392fa0
- Child:
- 8:75c5ec68765e
--- a/midiswitch.h Fri Aug 04 03:29:27 2017 +0200 +++ b/midiswitch.h Fri Aug 04 03:44:19 2017 +0200 @@ -6,6 +6,7 @@ #include "PinDetect.h" #include "USBMIDI.h" + typedef struct SwitchConfig { PinName pin; uint8_t channel; @@ -14,7 +15,6 @@ uint8_t off_value; } SwitchConfig; - typedef void (*MIDI_CB)(MIDIMessage); class SwitchHandler { @@ -22,17 +22,11 @@ SwitchHandler(EventQueue * queue, MIDI_CB cb, SwitchConfig * sw); void handle_pressed(void); void handle_released(void); -#ifndef NDEBUG - void setSerial(Serial * s) { serial = s; }; -#endif /* NDEBUG */ private: EventQueue * queue; MIDI_CB write_cb; PinDetect btn; uint8_t control, channel, on_value, off_value; -#ifndef NDEBUG - Serial * serial; -#endif /* NDEBUG */ }; #endif /* MIDISWITCH_H */