aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/MissileLauncher
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-07-16 15:00:10 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-07-16 15:00:10 +0000
commitd6543dee0d2723ee9f09137116264f123433b1a3 (patch)
treecf63e2aa77808e2bdc6a9c52c7cdd99e2b76a279 /Projects/MissileLauncher
parentc619e21fa74d7ea225292ecf5d514d0b253ad0a8 (diff)
downloadlufa-d6543dee0d2723ee9f09137116264f123433b1a3.tar.gz
lufa-d6543dee0d2723ee9f09137116264f123433b1a3.tar.bz2
lufa-d6543dee0d2723ee9f09137116264f123433b1a3.zip
Minor updates to the Magstripe and MissileLauncher projects to fix bugs and improve performance.
Fixed error in GenericHID descriptors preventing it from passing the USB-IF HID tests (thanks to Søren Greiner).
Diffstat (limited to 'Projects/MissileLauncher')
-rw-r--r--Projects/MissileLauncher/MissileLauncher.c5
1 files changed, 3 insertions, 2 deletions
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,