Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
ce3ea6fb
Commit
ce3ea6fb
authored
Jul 30, 2009
by
Dean Camera
Browse files
Added standard stream example to the ClassDriver CDC device demo.
Fix incorrect HWB button mask in the STK526 Buttons driver.
parent
5ca1d7bf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Demos/Device/ClassDriver/CDC/CDC.c
View file @
ce3ea6fb
...
...
@@ -57,6 +57,28 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
},
};
#if 0
/* NOTE: Here you can set up a standard stream using the created virtual serial port, so that the standard stream functions in
* <stdio.h> can be used on the virtual serial port (e.g. fprintf(&USBSerial, "Test"); to print a string).
*/
static int CDC_putchar(char c, FILE *stream)
{
CDC_Device_SendByte(&VirtualSerial_CDC_Interface, c);
return 0;
}
static int CDC_getchar(FILE *stream)
{
if (!(CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface)))
return -1;
return CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);
}
static FILE USBSerial = FDEV_SETUP_STREAM(CDC_putchar, CDC_getchar, _FDEV_SETUP_RW);
#endif
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
...
...
Demos/Device/LowLevel/CDC/CDC.c
View file @
ce3ea6fb
...
...
@@ -55,7 +55,7 @@ CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600,
* <stdio.h> can be used on the virtual serial port (e.g. fprintf(&USBSerial, "Test"); to print a string).
*/
static int CDC_putchar
(char c, FILE *stream)
static int CDC_putchar(char c, FILE *stream)
{
Endpoint_SelectEndpoint(CDC_TX_EPNUM);
...
...
@@ -71,7 +71,7 @@ static int CDC_putchar (char c, FILE *stream)
return 0;
}
static int CDC_getchar
(FILE *stream)
static int CDC_getchar(FILE *stream)
{
int c;
...
...
LUFA/Drivers/Board/STK526/Buttons.h
View file @
ce3ea6fb
...
...
@@ -64,7 +64,7 @@
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Button mask for the first button on the board. */
#define BUTTONS_BUTTON1 (1 <<
2
)
#define BUTTONS_BUTTON1 (1 <<
7
)
/* Inline Functions: */
#if !defined(__DOXYGEN__)
...
...
LUFA/ManPages/ChangeLog.txt
View file @
ce3ea6fb
...
...
@@ -76,6 +76,7 @@
* - Fixed incorrect PIPE_EPNUM_MASK mask causing pipe failures on devices with endpoint addresses of 8 and above (thanks to John Andrews)
* - Fixed report data alignment issues in the MouseHostWithParser demo when X and Y movement data size is not a multiple of 8 bits
* - Fixed HID Report Descriptor Parser not correctly resetting internal states when a REPORT ID element is encountered
* - Fixed incorrect BUTTONS_BUTTON1 for the STK526 target
*
*
* \section Sec_ChangeLog090605 Version 090605
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment