projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor updates to the Magstripe and MissileLauncher projects to fix bugs and improve...
[pub/USBasp.git]
/
Projects
/
MissileLauncher
/
MissileLauncher.c
diff --git
a/Projects/MissileLauncher/MissileLauncher.c
b/Projects/MissileLauncher/MissileLauncher.c
index
046c132
..
88902cf
100644
(file)
--- a/
Projects/MissileLauncher/MissileLauncher.c
+++ b/
Projects/MissileLauncher/MissileLauncher.c
@@
-137,8
+137,9
@@
void SetupHardware(void)
void Read_Joystick_Status(void)
\r
{
\r
uint8_t JoyStatus_LCL = Joystick_GetStatus();
\r
void Read_Joystick_Status(void)
\r
{
\r
uint8_t JoyStatus_LCL = Joystick_GetStatus();
\r
+ uint8_t Buttons_LCL = Buttons_GetStatus();
\r
\r
\r
- if (B
UTTONS_BUTTON1 && Buttons_GetStatus()
)
\r
+ if (B
uttons_LCL & BUTTONS_BUTTON1
)
\r
Send_Command(CMD_FIRE);
\r
else if (JoyStatus_LCL & JOY_UP)
\r
Send_Command(CMD_UP);
\r
Send_Command(CMD_FIRE);
\r
else if (JoyStatus_LCL & JOY_UP)
\r
Send_Command(CMD_UP);
\r
@@
-285,7
+286,7
@@
void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength)
/* Class specific request to send a HID report to the device */
\r
USB_ControlRequest = (USB_Request_Header_t)
\r
{
\r
/* Class specific request to send a HID report to the device */
\r
USB_ControlRequest = (USB_Request_Header_t)
\r
{
\r
- .bmRequestType =
0x21
,
\r
+ .bmRequestType =
(REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)
,
\r
.bRequest = 0x09,
\r
.wValue = 0x02,
\r
.wIndex = 0x01,
\r
.bRequest = 0x09,
\r
.wValue = 0x02,
\r
.wIndex = 0x01,
\r