![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
#include "../../../Common/Common.h"
#include "USBMode.h"
#include "StdRequestType.h"
#include "USBController.h"
Go to the source code of this file.
Macros | |
#define | USB_HOST_TIMEOUT_MS 1000 |
Enumerations | |
enum | USB_Host_SendControlErrorCodes_t { HOST_SENDCONTROL_Successful = 0, HOST_SENDCONTROL_DeviceDisconnected = 1, HOST_SENDCONTROL_PipeError = 2, HOST_SENDCONTROL_SetupStalled = 3, HOST_SENDCONTROL_SoftwareTimeOut = 4 } |
Functions | |
uint8_t | USB_Host_SendControlRequest (const uint8_t corenum, void *const BufferPtr) |
Sends the request stored in the USB_ControlRequest global structure to the attached device, and transfers the data stored in the buffer to the device, or from the device to the buffer as requested. The transfer is made on the currently selected pipe. | |
uint8_t | USB_Host_SetDeviceConfiguration (const uint8_t corenum, const uint8_t ConfigNumber) |
Sends a SET CONFIGURATION standard request to the attached device, with the given configuration index. | |
uint8_t | USB_Host_GetDeviceDescriptor (const uint8_t corenum, void *const DeviceDescriptorPtr) ATTR_NON_NULL_PTR_ARG(2) |
Sends a GET DESCRIPTOR standard request to the attached device, requesting the device descriptor. This can be used to easily retrieve information about the device such as its VID, PID and power requirements. | |
uint8_t | USB_Host_GetDeviceStringDescriptor (const uint8_t corenum, const uint8_t Index, void *const Buffer, const uint8_t BufferLength) ATTR_NON_NULL_PTR_ARG(3) |
Sends a GET DESCRIPTOR standard request to the attached device, requesting the string descriptor of the specified index. This can be used to easily retrieve string descriptors from the device by index, after the index is obtained from the Device or Configuration descriptors. | |
uint8_t | USB_Host_GetDeviceStatus (const uint8_t corenum, uint8_t *const FeatureStatus) ATTR_NON_NULL_PTR_ARG(2) |
Retrieves the current feature status of the attached device, via a GET STATUS standard request. The retrieved feature status can then be examined by masking the retrieved value with the various FEATURE_* masks for bus/self power information and remote wakeup support. | |
uint8_t | USB_Host_ClearEndpointStall (const uint8_t corenum, const uint8_t EndpointAddress) |
Clears a stall condition on the given pipe, via a CLEAR FEATURE standard request to the attached device. | |
uint8_t | USB_Host_SetInterfaceAltSetting (const uint8_t corenum, const uint8_t InterfaceIndex, const uint8_t AltSetting) |
Selects a given alternative setting for the specified interface, via a SET INTERFACE standard request to the attached device. | |
Variables | |
uint8_t | USB_Host_ConfigurationNumber |
#define USB_HOST_TIMEOUT_MS 1000 |
Constant for the maximum software timeout period of sent USB control transactions to an attached device. If a device fails to respond to a sent control request within this period, the library will return a timeout error code.
This value may be overridden in the user project makefile as the value of the USB_HOST_TIMEOUT_MS token, and passed to the compiler using the -D switch.
Definition at line 62 of file HostStandardReq.h.