| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
HCD.h File Reference
`#include "../../../../Common/Common.h"`
`#include "../StdRequestType.h"`
`#include "../HAL/HAL.h"`
`#include <string.h>`
`#include <stdio.h>`

Go to the source code of this file.

## Macros
#define | HCD_ENDPOINT_MAXPACKET_XFER_LEN 0xFFEEFFEE
#define | YES 1
#define | NO 0
#define | HCD_MAX_ENDPOINT 8
#define | HC_RESET_TIMEOUT 10
#define | TRANSFER_TIMEOUT_MS 1000
#define | PORT_RESET_PERIOD_MS 100
#define | INTERRUPT_LIST_ENABLE YES
#define | ISO_LIST_ENABLE YES
#define | hcd_printf(...)
#define | assert_status_ok_message(...)
#define | ASSERT_STATUS_OK_MESSAGE(sts, message)
#define | ASSERT_STATUS_OK(sts) ASSERT_STATUS_OK_MESSAGE(sts, NULL)

## Enumerations
enum | HCD_TRANSFER_TYPE { CONTROL_TRANSFER, ISOCHRONOUS_TRANSFER, BULK_TRANSFER, INTERRUPT_TRANSFER }
enum | HCD_TRANSFER_DIR { SETUP_TRANSFER, IN_TRANSFER, OUT_TRANSFER }
enum | HCD_USB_SPEED { FULL_SPEED = 0, LOW_SPEED, HIGH_SPEED }
enum | HCD_STATUS { HCD_STATUS_OK = 0, HCD_STATUS_TRANSFER_CRC, HCD_STATUS_TRANSFER_BitStuffing, HCD_STATUS_TRANSFER_DataToggleMismatch, HCD_STATUS_TRANSFER_Stall, HCD_STATUS_TRANSFER_DeviceNotResponding, HCD_STATUS_TRANSFER_PIDCheckFailure, HCD_STATUS_TRANSFER_UnexpectedPID, HCD_STATUS_TRANSFER_DataOverrun, HCD_STATUS_TRANSFER_DataUnderrun, HCD_STATUS_TRANSFER_CC_Reserved1, HCD_STATUS_TRANSFER_CC_Reserved2, HCD_STATUS_TRANSFER_BufferOverrun, HCD_STATUS_TRANSFER_BufferUnderrun, HCD_STATUS_TRANSFER_NotAccessed, HCD_STATUS_TRANSFER_Reserved, HCD_STATUS_STRUCTURE_IS_FREE, HCD_STATUS_TO_BE_REMOVED, HCD_STATUS_TRANSFER_QUEUED, HCD_STATUS_TRANSFER_COMPLETED, HCD_STATUS_TRANSFER_ERROR, HCD_STATUS_NOT_ENOUGH_MEMORY, HCD_STATUS_NOT_ENOUGH_ENDPOINT, HCD_STATUS_NOT_ENOUGH_GTD, HCD_STATUS_NOT_ENOUGH_ITD, HCD_STATUS_NOT_ENOUGH_QTD, HCD_STATUS_NOT_ENOUGH_HS_ITD, HCD_STATUS_NOT_ENOUGH_SITD, HCD_STATUS_DATA_OVERFLOW, HCD_STATUS_DEVICE_DISCONNECTED, HCD_STATUS_TRANSFER_TYPE_NOT_SUPPORTED, HCD_STATUS_PIPEHANDLE_INVALID, HCD_STATUS_PARAMETER_INVALID }

## Functions
HCD_STATUS | HcdInitDriver (uint8_t HostID)
| Initiate host driver.
HCD_STATUS | HcdDeInitDriver (uint8_t HostID)
| De-initiate host driver.
void | HcdIrqHandler (uint8_t HostID)
| Interrupt service routine for host mode This function must be called in chip's USB interrupt routine.
HCD_STATUS | HcdRhPortReset (uint8_t HostID)
| Perform USB bus reset.
HCD_STATUS | HcdRhPortEnable (uint8_t HostID)
| Turn on 5V USB VBUS.
HCD_STATUS | HcdRhPortDisable (uint8_t HostID)
| Turn off 5V USB VBUS.
HCD_STATUS | HcdGetDeviceSpeed (uint8_t HostID, HCD_USB_SPEED *DeviceSpeed)
| Get operation speed of connected device.
uint32_t | HcdGetFrameNumber (uint8_t HostID)
| Get current frame number.
HCD_STATUS | HcdOpenPipe (uint8_t HostID, uint8_t DeviceAddr, HCD_USB_SPEED DeviceSpeed, uint8_t EndpointNo, HCD_TRANSFER_TYPE TransferType, HCD_TRANSFER_DIR TransferDir, uint16_t MaxPacketSize, uint8_t Interval, uint8_t Mult, uint8_t HSHubDevAddr, uint8_t HSHubPortNum, uint32_t *const PipeHandle)
| Setup a pipe to connect to device's logical endpoint.
HCD_STATUS | HcdClosePipe (uint32_t PipeHandle)
| Delete the link between USB host and device's logical endpoint.
HCD_STATUS | HcdCancelTransfer (uint32_t PipeHandle)
| Cancel a processing transfer.
HCD_STATUS | HcdClearEndpointHalt (uint32_t PipeHandle)
| Clear stall status for connected endpoint.
HCD_STATUS | HcdControlTransfer (uint32_t PipeHandle, const USB_Request_Header_t *const pDeviceRequest, uint8_t *const buffer)
| Perform a control transfer.
HCD_STATUS | HcdDataTransfer (uint32_t PipeHandle, uint8_t *const buffer, uint32_t const length, uint16_t *const pActualTransferred)
| Perform a non-control transfer.
HCD_STATUS | HcdGetPipeStatus (uint32_t PipeHandle)
| Get current pipe status.
void | HcdSetStreamPacketSize (uint32_t PipeHandle, uint16_t packetsize)
| Set size of each packet in a continuous data transfer.