Silicon Laboratories SiM3U1xx Bedienungsanleitung Seite 14

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 30
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 13
AN758
14 Rev. 0.1
5.3.4. EVENT_USB_Device_ControlRequest
Event handler for control request.
Syntax
void EVENT_USB_Device_ControlRequest(void)
Parameters
None
Return Value
None
Description
This function is event handler for the library USB Control Request reception event. It handlers USB CDC special
class request from USB host.
Example
if(Endpoint_IsSETUPReceived())
{
uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest;
for (uint8_t RequestHeaderByte = 0; RequestHeaderByte <
sizeof(USB_Request_Header_t); RequestHeaderByte++)
*(RequestHeader++) = Endpoint_Read_8();
}
EVENT_USB_Device_ControlRequest();
5.3.5. EVENT_CDC_Device_LineEncodingChanged
Event handler for the CDC Class driver Line Encoding Changed event.
Syntax
void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const
CDCInterfaceInfo)
Parameters
CDCInterfaceInfo:Pointer to the CDC class interface configuration structure
Return Value
None
Description
This function change UART configuration according CDC class interface configuration.
Example
CDCInterfaceInfo->State.LineEncoding.BaudRateBPS = Endpoint_Read_32_LE();
CDCInterfaceInfo->State.LineEncoding.CharFormat = Endpoint_Read_8();
CDCInterfaceInfo->State.LineEncoding.ParityType = Endpoint_Read_8();
CDCInterfaceInfo->State.LineEncoding.DataBits = Endpoint_Read_8();
Endpoint_ClearOUT();
Endpoint_ClearStatusStage();
EVENT_CDC_Device_LineEncodingChanged(CDCInterfaceInfo);
Seitenansicht 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 29 30

Kommentare zu diesen Handbüchern

Keine Kommentare