Skip to content

Commit

Permalink
usb_serial app: Changed it to use the baud rate specified by the USB …
Browse files Browse the repository at this point in the history
…host, and tested it using a loopback wire and an oscilloscope. It was able to handle a constant stream of data in both directions at 250 kbaud!
  • Loading branch information
DavidEGrayson committed Mar 24, 2011
1 parent 0cd17e5 commit 92da5ae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/usb_serial/usb_serial.c
Expand Up @@ -55,13 +55,19 @@ void usbToUartService()
}
}

void lineCodingChanged()
{
uart1SetBaudRate(usbComLineCoding.dwDTERate);
}

void main()
{
systemInit();
usbInit();
usbComLineCodingChangeHandler = &lineCodingChanged;

uart1Init();
uart1SetBaudRate(9600);
lineCodingChanged();

while(1)
{
Expand Down

0 comments on commit 92da5ae

Please sign in to comment.