From 63a8f66d92b5d7018a4d962f4f7b23774a621771 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 6 May 2009 07:50:34 +0000 Subject: Changed HWB board driver to Buttons driver, to allow for the support of future boards with more than one mounted GPIO button. --- Demos/Device/MIDI/MIDI.c | 6 +++--- Demos/Device/MIDI/MIDI.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Demos/Device/MIDI') diff --git a/Demos/Device/MIDI/MIDI.c b/Demos/Device/MIDI/MIDI.c index 7e1d21156..1323e1163 100644 --- a/Demos/Device/MIDI/MIDI.c +++ b/Demos/Device/MIDI/MIDI.c @@ -58,7 +58,7 @@ int main(void) /* Hardware Initialization */ Joystick_Init(); LEDs_Init(); - HWB_Init(); + Buttons_Init(); /* Indicate USB not ready */ UpdateStatus(Status_USBNotReady); @@ -134,8 +134,8 @@ TASK(USB_MIDI_Task) uint8_t JoystickStatus = Joystick_GetStatus(); uint8_t JoystickChanges = (JoystickStatus ^ PrevJoystickStatus); - /* Get HWB status - if set use channel 10 (percussion), otherwise use channel 1 */ - uint8_t Channel = ((HWB_GetStatus()) ? MIDI_CHANNEL(10) : MIDI_CHANNEL(1)); + /* Get board button status - if pressed use channel 10 (percussion), otherwise use channel 1 */ + uint8_t Channel = ((Buttons_GetStatus() & BUTTONS_BUTTON1) ? MIDI_CHANNEL(10) : MIDI_CHANNEL(1)); if (JoystickChanges & JOY_LEFT) SendMIDINoteChange(0x3C, (JoystickStatus & JOY_LEFT), 0, Channel); diff --git a/Demos/Device/MIDI/MIDI.h b/Demos/Device/MIDI/MIDI.h index 4e81c8c2a..4d801e82f 100644 --- a/Demos/Device/MIDI/MIDI.h +++ b/Demos/Device/MIDI/MIDI.h @@ -48,7 +48,7 @@ #include // USB Functionality #include // Joystick driver #include // LEDs driver - #include // Hardware Button driver + #include // Board Buttons driver #include // Simple scheduler for task management /* Macros: */ -- cgit v1.2.3