11 #ifndef __BRP_BALTECH_API_CMDS_USBHOST_H__ 12 #define __BRP_BALTECH_API_CMDS_USBHOST_H__ 13 #include "../typedefs.h" 17 #define BRP_UsbHost_UsbhstErrNotconnected BRP_ERR_STATUS(0x4400, 0x01) 21 #define BRP_UsbHost_UsbhstErrTimeout BRP_ERR_STATUS(0x4400, 0x02) 25 #define BRP_UsbHost_UsbhstErrNack BRP_ERR_STATUS(0x4400, 0x03) 29 #define BRP_UsbHost_UsbhstErrStall BRP_ERR_STATUS(0x4400, 0x04) 33 #define BRP_UsbHost_UsbhstErrTransfer BRP_ERR_STATUS(0x4400, 0x05) 37 #define BRP_UsbHost_UsbhstErrUnexpectedPkt BRP_ERR_STATUS(0x4400, 0x06) 41 #define BRP_UsbHost_UsbhstErrBufferoverflow BRP_ERR_STATUS(0x4400, 0x07) 45 #define BRP_UsbHost_UsbhstErrSetupPipes BRP_ERR_STATUS(0x4400, 0x20) brp_errcode brp_UsbHost_Suspend(brp_protocol protocol)
Send a Suspend via USB interface.
brp_errcode brp_UsbHost_TransSetupOut(brp_protocol protocol, brp_buf SetupData, brp_buf OutData, size_t OutData_len, unsigned PipeNo, unsigned Timeout)
Transfers a SETUP transaction with a OUT DATA stage.
brp_errcode brp_UsbHost_TransOut(brp_protocol protocol, brp_buf OutData, size_t OutData_len, unsigned PipeNo, bool Continue, unsigned Timeout)
Transfers an OUT transaction.
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
brp_errcode brp_UsbHost_IsConnected(brp_protocol protocol, bool *Connected)
Check if a device is connected.
brp_errcode brp_UsbHost_SetAddr(brp_protocol protocol, unsigned Address)
Set Address of device.
struct brp_mempool_object_t * brp_mempool
mempool handle.
brp_errcode brp_UsbHost_SetupPipes(brp_protocol protocol, brp_UsbHost_SetupPipes_Pipes_Entry *Pipes, size_t Pipes_len)
Setup all Pipes Definitions (uC's internal configuration).
brp_errcode brp_UsbHost_TransRawSetup(brp_protocol protocol, brp_buf SetupData, unsigned PipeNo, unsigned Timeout)
Transfers a raw SETUP packet.
brp_errcode brp_UsbHost_TransIn(brp_protocol protocol, unsigned PipeNo, unsigned Timeout, brp_buf *InData, size_t *InData_len, brp_mempool *mempool)
Transfers an IN transaction.
brp_errcode brp_UsbHost_TransSetupIn(brp_protocol protocol, brp_buf SetupData, unsigned PipeNo, unsigned Timeout, brp_buf *InData, size_t *InData_len, brp_mempool *mempool)
Transfers a SETUP transaction with a IN DATA stage.
brp_errcode brp_UsbHost_Resume(brp_protocol protocol)
Send a Resume via USB interface.
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
brp_errcode brp_UsbHost_Reset(brp_protocol protocol)
Send a Reset via USB interface, Remove all Pipes Definitions and reset address of device to 0...
brp_errcode brp_UsbHost_Enable(brp_protocol protocol, bool Enable)
Enable/Disable the USB-Host-Interface of the uC.