diff options
Diffstat (limited to 'Demos/Device/ClassDriver')
-rw-r--r-- | Demos/Device/ClassDriver/CDC/CDC.c | 19 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/DualCDC/DualCDC.c | 19 |
2 files changed, 10 insertions, 28 deletions
diff --git a/Demos/Device/ClassDriver/CDC/CDC.c b/Demos/Device/ClassDriver/CDC/CDC.c index 4f64646ea..f09d3f136 100644 --- a/Demos/Device/ClassDriver/CDC/CDC.c +++ b/Demos/Device/ClassDriver/CDC/CDC.c @@ -124,25 +124,16 @@ void CheckJoystickMovement(void) char* ReportString = NULL;
static bool ActionSent = false;
- char* const JoystickStrings[] =
- {
- "Joystick Up\r\n",
- "Joystick Down\r\n",
- "Joystick Left\r\n",
- "Joystick Right\r\n",
- "Joystick Pressed\r\n",
- };
-
if (JoyStatus_LCL & JOY_UP)
- ReportString = JoystickStrings[0];
+ ReportString = "Joystick Up\r\n";
else if (JoyStatus_LCL & JOY_DOWN)
- ReportString = JoystickStrings[1];
+ ReportString = "Joystick Down\r\n";
else if (JoyStatus_LCL & JOY_LEFT)
- ReportString = JoystickStrings[2];
+ ReportString = "Joystick Left\r\n";
else if (JoyStatus_LCL & JOY_RIGHT)
- ReportString = JoystickStrings[3];
+ ReportString = "Joystick Right\r\n";
else if (JoyStatus_LCL & JOY_PRESS)
- ReportString = JoystickStrings[4];
+ ReportString = "Joystick Pressed\r\n";
else
ActionSent = false;
diff --git a/Demos/Device/ClassDriver/DualCDC/DualCDC.c b/Demos/Device/ClassDriver/DualCDC/DualCDC.c index e5406a4ba..5ee3c4d05 100644 --- a/Demos/Device/ClassDriver/DualCDC/DualCDC.c +++ b/Demos/Device/ClassDriver/DualCDC/DualCDC.c @@ -132,25 +132,16 @@ void CheckJoystickMovement(void) char* ReportString = NULL;
static bool ActionSent = false;
- char* const JoystickStrings[] =
- {
- "Joystick Up\r\n",
- "Joystick Down\r\n",
- "Joystick Left\r\n",
- "Joystick Right\r\n",
- "Joystick Pressed\r\n",
- };
-
if (JoyStatus_LCL & JOY_UP)
- ReportString = JoystickStrings[0];
+ ReportString = "Joystick Up\r\n";
else if (JoyStatus_LCL & JOY_DOWN)
- ReportString = JoystickStrings[1];
+ ReportString = "Joystick Down\r\n";
else if (JoyStatus_LCL & JOY_LEFT)
- ReportString = JoystickStrings[2];
+ ReportString = "Joystick Left\r\n";
else if (JoyStatus_LCL & JOY_RIGHT)
- ReportString = JoystickStrings[3];
+ ReportString = "Joystick Right\r\n";
else if (JoyStatus_LCL & JOY_PRESS)
- ReportString = JoystickStrings[4];
+ ReportString = "Joystick Pressed\r\n";
else
ActionSent = false;
|