diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-07-15 11:01:31 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-07-15 11:01:31 +0000 |
| commit | fafe59ee089f579e66e6e740b791120fcba265d1 (patch) | |
| tree | fa40f50761a29781d5d3b6e3b94a784a18a19bc2 /Projects/XPLAINBridge/XPLAINBridge.c | |
| parent | 79ee5516459e285d3512648a262a289ddcac2056 (diff) | |
Added ability to set the serial baud rate via the user's terminal in the XPLAINBridge project.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1390 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/XPLAINBridge/XPLAINBridge.c')
| -rw-r--r-- | Projects/XPLAINBridge/XPLAINBridge.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c index 3bbc0bc6..2e8e6a89 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.c +++ b/Projects/XPLAINBridge/XPLAINBridge.c @@ -225,6 +225,16 @@ void EVENT_USB_Device_Disconnect(void) LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); } +/** Event handler for the CDC Class driver Line Encoding Changed event. + * + * \param[in] CDCInterfaceInfo Pointer to the CDC class interface configuration structure being referenced + */ +void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) +{ + /* Change the software UART's baud rate to match the new baud rate */ + SoftUART_SetBaud(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS); +} + /** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" * documentation) by the application code so that the address and size of a requested descriptor can be given * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function |
