projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added beginnings of a new AVRISP-MKII clone project.
[pub/USBasp.git]
/
Demos
/
Device
/
ClassDriver
/
CDC
/
CDC.c
diff --git
a/Demos/Device/ClassDriver/CDC/CDC.c
b/Demos/Device/ClassDriver/CDC/CDC.c
index
8e3530c
..
f09d3f1
100644
(file)
--- a/
Demos/Device/ClassDriver/CDC/CDC.c
+++ b/
Demos/Device/ClassDriver/CDC/CDC.c
@@
-124,25
+124,16
@@
void CheckJoystickMovement(void)
char* ReportString = NULL;
\r
static bool ActionSent = false;
\r
\r
char* ReportString = NULL;
\r
static bool ActionSent = false;
\r
\r
- char* const JoystickStrings[] =
\r
- {
\r
- "Joystick Up\r\n",
\r
- "Joystick Down\r\n",
\r
- "Joystick Left\r\n",
\r
- "Joystick Right\r\n",
\r
- "Joystick Pressed\r\n",
\r
- };
\r
-
\r
if (JoyStatus_LCL & JOY_UP)
\r
if (JoyStatus_LCL & JOY_UP)
\r
- ReportString =
JoystickStrings[0]
;
\r
+ ReportString =
"Joystick Up\r\n"
;
\r
else if (JoyStatus_LCL & JOY_DOWN)
\r
else if (JoyStatus_LCL & JOY_DOWN)
\r
- ReportString =
JoystickStrings[1]
;
\r
+ ReportString =
"Joystick Down\r\n"
;
\r
else if (JoyStatus_LCL & JOY_LEFT)
\r
else if (JoyStatus_LCL & JOY_LEFT)
\r
- ReportString =
JoystickStrings[2]
;
\r
+ ReportString =
"Joystick Left\r\n"
;
\r
else if (JoyStatus_LCL & JOY_RIGHT)
\r
else if (JoyStatus_LCL & JOY_RIGHT)
\r
- ReportString =
JoystickStrings[3]
;
\r
+ ReportString =
"Joystick Right\r\n"
;
\r
else if (JoyStatus_LCL & JOY_PRESS)
\r
else if (JoyStatus_LCL & JOY_PRESS)
\r
- ReportString =
JoystickStrings[4]
;
\r
+ ReportString =
"Joystick Pressed\r\n"
;
\r
else
\r
ActionSent = false;
\r
\r
else
\r
ActionSent = false;
\r
\r
@@
-155,19
+146,19
@@
void CheckJoystickMovement(void)
}
\r
\r
/** Event handler for the library USB Connection event. */
\r
}
\r
\r
/** Event handler for the library USB Connection event. */
\r
-void EVENT_USB_Connect(void)
\r
+void EVENT_USB_
Device_
Connect(void)
\r
{
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
/** Event handler for the library USB Disconnection event. */
\r
{
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
/** Event handler for the library USB Disconnection event. */
\r
-void EVENT_USB_Disconnect(void)
\r
+void EVENT_USB_D
evice_D
isconnect(void)
\r
{
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
/** Event handler for the library USB Configuration Changed event. */
\r
{
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
/** Event handler for the library USB Configuration Changed event. */
\r
-void EVENT_USB_ConfigurationChanged(void)
\r
+void EVENT_USB_
Device_
ConfigurationChanged(void)
\r
{
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
\r
{
\r
LEDs_SetAllLEDs(LEDMASK_USB_READY);
\r
\r
@@
-175,8
+166,8
@@
void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
-/** Event handler for the library USB Unhandled Control
Packe
t event. */
\r
-void EVENT_USB_
UnhandledControlPacke
t(void)
\r
+/** Event handler for the library USB Unhandled Control
Reques
t event. */
\r
+void EVENT_USB_
Device_UnhandledControlReques
t(void)
\r
{
\r
{
\r
- CDC_Device_ProcessControl
Packe
t(&VirtualSerial_CDC_Interface);
\r
+ CDC_Device_ProcessControl
Reques
t(&VirtualSerial_CDC_Interface);
\r
}
\r
}
\r