From d6543dee0d2723ee9f09137116264f123433b1a3 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 16 Jul 2009 15:00:10 +0000 Subject: Minor updates to the Magstripe and MissileLauncher projects to fix bugs and improve performance. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed error in GenericHID descriptors preventing it from passing the USB-IF HID tests (thanks to Søren Greiner). --- Projects/MissileLauncher/MissileLauncher.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Projects/MissileLauncher') diff --git a/Projects/MissileLauncher/MissileLauncher.c b/Projects/MissileLauncher/MissileLauncher.c index 046c132f0..88902cf2e 100644 --- a/Projects/MissileLauncher/MissileLauncher.c +++ b/Projects/MissileLauncher/MissileLauncher.c @@ -137,8 +137,9 @@ void SetupHardware(void) void Read_Joystick_Status(void) { uint8_t JoyStatus_LCL = Joystick_GetStatus(); + uint8_t Buttons_LCL = Buttons_GetStatus(); - if (BUTTONS_BUTTON1 && Buttons_GetStatus()) + if (Buttons_LCL & BUTTONS_BUTTON1) Send_Command(CMD_FIRE); else if (JoyStatus_LCL & JOY_UP) Send_Command(CMD_UP); @@ -285,7 +286,7 @@ void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength) /* Class specific request to send a HID report to the device */ USB_ControlRequest = (USB_Request_Header_t) { - .bmRequestType = 0x21, + .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE), .bRequest = 0x09, .wValue = 0x02, .wIndex = 0x01, -- cgit v1.2.3