Silicon Laboratories SiM3U1xx Manual de usuario Pagina 7

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 30
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 6
AN758
Rev. 0.1 7
5. Detailed List of Functions
This section discusses the detailed function declarations in the CDC USB stack firmware example.
5.1. CDC Functions
This section focuses on the functions found in the CDCClassDevice.c and CDCClassDevice.h files
(AN758_USB_CDC\src\LUFA\Drivers\USB\Class\Device directory). This file implements the USB CDC device
class.
5.1.1. CDC_Device_Process_ControlRequest
Handle USB CDC special class request.
Syntax
void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* const
CDCInterfaceInfo)
Parameters
CDCInterfaceInfo: Pointer to CDC Class state structure
Return Value
None
Description
This function parses the USB control request to handle different USB CDC special class request. Update
CDCInterfaceInfo with data from USB host, or send data in CDCInterfaceInfo to USB host.
Example
USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
.ControlInterfaceNumber = 0,
.DataINEndpoint =
{
.Address = CDC_TX_EPADDR,
.Size = CDC_TXRX_EPSIZE,
.Banks = 1,
},
.DataOUTEndpoint =
{
.Address = CDC_RX_EPADDR,
.Size = CDC_TXRX_EPSIZE,
.Banks = 1,
},
.NotificationEndpoint =
{
.Address = CDC_NOTIFICATION_EPADDR,
.Size = CDC_NOTIFICATION_EPSIZE,
.Banks = 1,
},
},
};
CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
Vista de pagina 6
1 2 3 4 5 6 7 8 9 10 11 12 ... 29 30

Comentarios a estos manuales

Sin comentarios