diff options
author | Dean Camera <[email protected]> | 2010-07-15 11:01:31 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-07-15 11:01:31 +0000 |
commit | dfe50ff34970eda173cafbb3d636a5f7bedc87bd (patch) | |
tree | fa40f50761a29781d5d3b6e3b94a784a18a19bc2 /Projects/XPLAINBridge/XPLAINBridge.c | |
parent | 40631e9fe5f0782c1fbc3019904d1298ac365cd1 (diff) | |
download | qmk_firmware-dfe50ff34970eda173cafbb3d636a5f7bedc87bd.tar.gz qmk_firmware-dfe50ff34970eda173cafbb3d636a5f7bedc87bd.zip |
Added ability to set the serial baud rate via the user's terminal in the XPLAINBridge project.
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 3bbc0bc653..2e8e6a89ec 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 |