Description
Source
Call Graph
Start Line: 277
void CDCDSerialDriver_SetSerialState(unsigned short serialState)
{
ASSERT((serialState & 0xFF80) == 0,
"CDCDSerialDriver_SetSerialState: Bits D7-D15 are reserved\n\r");
// If new state is different from previous one, send a notification to the
// host
if (cdcdSerialDriver.serialState != serialState) {
cdcdSerialDriver.serialState = serialState;
USBD_Write(CDCDSerialDriverDescriptors_NOTIFICATION,
&(cdcdSerialDriver.serialState),
2,
0,
0);
// Reset one-time flags
cdcdSerialDriver.serialState &= ~(CDCDSerialDriver_STATE_OVERRUN
| CDCDSerialDriver_STATE_PARITY
| CDCDSerialDriver_STATE_FRAMING
| CDCDSerialDriver_STATE_RINGSIGNAL
| CDCDSerialDriver_STATE_BREAK);
}
}