Added ability to set the serial baud rate via the user's terminal in the XPLAINBridge project.
This commit is contained in:
parent
40631e9fe5
commit
dfe50ff349
9 changed files with 40 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue