Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: PinDetect USBDevice_STM32F103 mbed-STM32F103C8T6
Diff: midiswitch.cpp
- Revision:
- 6:2f804d29cbb0
- Parent:
- 3:8b8cb5392fa0
- Child:
- 7:553836a26221
diff -r 1208f33a9a7c -r 2f804d29cbb0 midiswitch.cpp
--- a/midiswitch.cpp Fri Aug 04 03:29:27 2017 +0200
+++ b/midiswitch.cpp Fri Aug 04 03:44:19 2017 +0200
@@ -5,21 +5,12 @@
btn.attach_asserted(this, &SwitchHandler::handle_pressed);
btn.attach_deasserted(this, &SwitchHandler::handle_released);
btn.setSampleFrequency();
-#ifndef NDEBUG
- serial = NULL;
-#endif
};
void SwitchHandler::handle_pressed(void) {
-#ifndef NDEBUG
- serial->printf("Switch pressed: control=%d channel=%d value=%d\r\n", control, channel, on_value);
-#endif
queue->call(write_cb, MIDIMessage::ControlChange((int) control, (int) on_value, (int) (channel - 1)));
};
void SwitchHandler::handle_released(void) {
-#ifndef NDEBUG
- serial->printf("Switch released: control=%d channel=%d value=%d\r\n", control, channel, off_value);
-#endif
queue->call(write_cb, MIDIMessage::ControlChange((int) control, (int) off_value, (int) (channel - 1)));
};