Fix incorrect HWB button mask in the STK526 Buttons driver.
},\r
};\r
\r
+#if 0\r
+/* NOTE: Here you can set up a standard stream using the created virtual serial port, so that the standard stream functions in\r
+ * <stdio.h> can be used on the virtual serial port (e.g. fprintf(&USBSerial, "Test"); to print a string).\r
+ */\r
+\r
+static int CDC_putchar(char c, FILE *stream)\r
+{\r
+ CDC_Device_SendByte(&VirtualSerial_CDC_Interface, c);\r
+ return 0;\r
+}\r
+\r
+static int CDC_getchar(FILE *stream)\r
+{\r
+ if (!(CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface)))\r
+ return -1;\r
+\r
+ return CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);\r
+}\r
+\r
+static FILE USBSerial = FDEV_SETUP_STREAM(CDC_putchar, CDC_getchar, _FDEV_SETUP_RW);\r
+#endif\r
+\r
/** Main program entry point. This routine contains the overall program flow, including initial\r
* setup of all components and the main program loop.\r
*/\r
* <stdio.h> can be used on the virtual serial port (e.g. fprintf(&USBSerial, "Test"); to print a string).\r
*/\r
\r
-static int CDC_putchar (char c, FILE *stream)\r
+static int CDC_putchar(char c, FILE *stream)\r
{ \r
Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
\r
return 0;\r
}\r
\r
-static int CDC_getchar (FILE *stream)\r
+static int CDC_getchar(FILE *stream)\r
{\r
int c;\r
\r
/* Public Interface - May be used in end-application: */\r
/* Macros: */\r
/** Button mask for the first button on the board. */\r
- #define BUTTONS_BUTTON1 (1 << 2)\r
+ #define BUTTONS_BUTTON1 (1 << 7)\r
\r
/* Inline Functions: */\r
#if !defined(__DOXYGEN__)\r
* - Fixed incorrect PIPE_EPNUM_MASK mask causing pipe failures on devices with endpoint addresses of 8 and above (thanks to John Andrews)\r
* - Fixed report data alignment issues in the MouseHostWithParser demo when X and Y movement data size is not a multiple of 8 bits\r
* - Fixed HID Report Descriptor Parser not correctly resetting internal states when a REPORT ID element is encountered\r
+ * - Fixed incorrect BUTTONS_BUTTON1 for the STK526 target\r
*\r
*\r
* \section Sec_ChangeLog090605 Version 090605\r