
AN758
24 Rev. 0.1
5.4.13. Endpoint_Write_Stream_LE
Write stream data to correspond endpoint.
Syntax
uint8_t Endpoint_Write_Stream_LE(const void* const Buffer,
uint16_t Length,
uint16_t* const BytesProcessed)
Parameters
Buffer: pointer to data buffer
Length: Transmit length
Return Value
ENDPOINT_RWSTREAM_NoError,
ENDPOINT_READYWAIT_EndpointStalled,
ENDPOINT_READYWAIT_DeviceDisconnected,
ENDPOINT_READYWAIT_BusSuspended,
ENDPOINT_READYWAIT_Timeout
Description
This function writes stream data to correspond endpoint according usb_ep_selected.
Example
Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpoint.Address);
return Endpoint_Write_Stream_LE(Buffer, Length, NULL);
5.4.14. Endpoint_ClearIN
Sends an IN packet to the host on the currently selected endpoint.
Syntax
static inline void Endpoint_ClearIN(void)
Parameters
None
Return Value
None
Description
This function Sends an IN packet to the host on the currently selected endpoint. It set IPRDYI = 1 to start USB IN
transmits.
Example
CDC_Device_SendData(&VirtualSerial_CDC_Interface, (char *)in_buff, recv_count);
Endpoint_ClearIN();
Kommentare zu diesen Handbüchern