Simplify CDC device demos, by directly assigning the string to transmit to the pointe...
[pub/USBasp.git] / Demos / Device / ClassDriver / DualCDC / DualCDC.c
index e5406a4..5ee3c4d 100644 (file)
@@ -132,25 +132,16 @@ void CheckJoystickMovement(void)
        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
-         ReportString = JoystickStrings[0];\r
+         ReportString = "Joystick Up\r\n";\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
-         ReportString = JoystickStrings[2];\r
+         ReportString = "Joystick Left\r\n";\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
-         ReportString = JoystickStrings[4];\r
+         ReportString = "Joystick Pressed\r\n";\r
        else\r
          ActionSent = false;\r
          \r