Classes | Macros | Typedefs | Enumerations | Functions
gr55xx_hal_usb.h File Reference

Header file containing functions prototypes of USB HAL library. More...

`#include "gr55xx_ll_usb.h"`
`#include "gr55xx_hal_def.h"`
Include dependency graph for gr55xx_hal_usb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | hw_enum_parm
| USB hardware enumeration Structure definition. More...
struct | _usb_init
| USB init Structure definition. More...
struct | _usb_handle
| USB handle Structure definition. More...
struct | _hal_usb_callback
| HAL_USB Callback function definition. More...

## Macros
#define | HAL_USB_ERROR_NONE ((uint32_t)0x00000000)
| No error More...
#define | HAL_USB_ERROR_TIMEOUT ((uint32_t)0x00000001)
| Timeout error More...
#define | HAL_USB_ERROR_TRANSFER ((uint32_t)0x00000002)
| Transfer error More...
#define | HAL_USB_ERROR_DMA ((uint32_t)0x00000004)
| DMA transfer error. More...
#define | HAL_USB_ERROR_INVALID_PARAM ((uint32_t)0x00000008)
| Invalid parameters error. More...
#define | HAL_USB_FIFO_EP0 (USB_BASE + 0x40)
| USB EP0 FIFO address. More...
#define | HAL_USB_FIFO_EP1 (USB_BASE + 0x44)
| USB EP1 FIFO address. More...
#define | HAL_USB_FIFO_EP2 (USB_BASE + 0x48)
| USB EP2 FIFO address. More...
#define | HAL_USB_FIFO_EP3 (USB_BASE + 0x4C)
| USB EP3 FIFO address. More...
#define | USB_PWR_MODE_LP LL_USB_PWR_MODE_LP
| usb working in low power mode. More...
#define | USB_PWR_MODE_NORMAL LL_USB_PWR_MODE_NORMAL
| usb working in normal mode. More...
#define | USB_HAL_SPEED_LOW LL_USB_XCRV_CTRL_SPEED_LOW
| USB Transceiver speed select: low speed More...
#define | USB_HAL_SPEED_FULL LL_USB_XCRV_CTRL_SPEED_FULL
| USB Transceiver speed select: full speed More...
#define | USB_ENUM_TYPE_HW LL_USB_ENUM_TYPE_HW
| USB hardware enumeration type More...
#define | USB_ENUM_TYPE_MCU LL_USB_ENUM_TYPE_MCU
| USB MCU enumeration type More...
#define | USB_EP_ATTR_INT ((uint32_t)0x00000000UL)
| Endpoint attribute setting: interrupt More...
#define | USB_EP_ATTR_ISO ((uint32_t)0x00000001UL)
| Endpoint attribute setting: Isochronous More...
#define | USB_EP_ATTR_BULK ((uint32_t)0x00000002UL)
| Endpoint attribute setting: bulk More...
#define | USB_EP4_FIFO_WEN_DEFAULT LL_USB_EP4_FIFO_WEN_DEFAULT
| USB ep4 write fifo enable default value More...
#define | USB_EP4_FIFO_WEN_1BYTE LL_USB_EP4_FIFO_WEN_1BYTE
| USB ep4 write fifo 1 byte effective More...
#define | USB_EP4_FIFO_WEN_2BYTE LL_USB_EP4_FIFO_WEN_2BYTE
| USB ep4 write fifo 2 byte effective More...
#define | USB_EP4_FIFO_WEN_3BYTE LL_USB_EP4_FIFO_WEN_3BYTE
| USB ep4 write fifo 3 byte effective More...
#define | USB_EP4_FIFO_WEN_4BYTE LL_USB_EP4_FIFO_WEN_4BYTE
| USB ep4 write fifo 4 byte effective More...
#define | HAL_USB_TIMEOUT_DEFAULT_VALUE ((uint32_t)5000)
| 5s More...
#define | USB_FLAG_SUSPEND LL_USB_INT_STAT_SUSPEND
| USB suspend status flag More...
#define | USB_FLAG_EP0_OUT_READY LL_USB_INT_STAT_EP0_OUT_READY
| USB ep0 data out ready flag More...
#define | USB_FLAG_EP1_OUT_READY LL_USB_INT_STAT_EP1_OUT_READY
| USB ep1 data out ready flag More...
#define | USB_FLAG_CRC16_ERR LL_USB_INT_STAT_CRC16_ERR
| USB receive CRC error data flag More...
#define | USB_FLAG_UPID_ERR LL_USB_INT_STAT_UPID_ERR
| USB receive unsupported PID flag More...
#define | USB_FLAG_TIMEOUT_ERR LL_USB_INT_STAT_TIMEOUT_ERR
| USB rx/tx timeout error flag More...
#define | USB_FLAG_SEQ_ERR LL_USB_INT_STAT_SEQ_ERR
| USB DATA0/DATA1 PID sequence error flag More...
#define | USB_FLAG_PID_CKS_ERR LL_USB_INT_STAT_PID_CKS_ERR
| USB PID checksum error flag More...
#define | USB_FLAG_PID_CRC_ERR LL_USB_INT_STAT_PID_CRC_ERR
| USB PID CRC error flag More...
#define | USB_FLAG_HOST_RESET LL_USB_INT_STAT_HOST_RESET
| USB host reset flag More...
#define | USB_FLAG_AHB_XFER_ERR LL_USB_INT_STAT_AHB_XFER_ERR
| USB ep3 and ep4 AHB master receive error flag More...
#define | USB_FLAG_NSE_ERR LL_USB_INT_STAT_NSE_ERR
| USB no such endpoint error flag More...
#define | USB_FLAG_EP3_AHB_XFER_DONE LL_USB_INT_STAT_EP3_AHB_XFER_DONE
| USB ep3 AHB master transfer done flag More...
#define | USB_FLAG_SYNC_ERR LL_USB_INT_STAT_SYNC_ERR
| USB SYNC error flag More...
#define | USB_FLAG_BIT_STUFF_ERR LL_USB_INT_STAT_BIT_STUFF_ERR
| USB bit stuff error flag More...
#define | USB_FLAG_BYTE_ERR LL_USB_INT_STAT_BYTE_ERR
| USB byte error flag More...
#define | USB_FLAG_SOF LL_USB_INT_STAT_SOF
| USB SOF flag More...
#define | USB_FLAG_EP0_TX_DONE LL_USB_INT_STAT_EP0_TX_DONE
| USB ep0 TX done flag More...
#define | USB_FLAG_EP2_TX_DONE LL_USB_INT_STAT_EP2_TX_DONE
| USB ep2 TX done flag More...
#define | USB_FLAG_EP3_TX_DONE LL_USB_INT_STAT_EP3_TX_DONE
| USB ep3 TX done flag More...
#define | USB_FLAG_INTO_CONFIG LL_USB_INT_STAT_INTO_CONFIG
| USB into cofig status flag More...
#define | USB_FLAG_EP5_OUT_READY LL_USB_INT_STAT_EP5_OUT_READY
| USB ep5 data out ready flag More...
#define | USB_FLAG_EP4_AHB_XFER_DONE LL_USB_INT_STAT_EP4_AHB_XFER_DONE
| USB ep4 AHB master transfer done flag More...
#define | USB_FLAG_EP4_TX_DONE LL_USB_INT_STAT_EP4_TX_DONE
| USB ep4 TX done flag More...
#define | USB_FLAG_EP5_AHB_XFER_DONE LL_USB_INT_STAT_EP5_AHB_XFER_DONE
| USB ep5 AHB master transfer done flag More...
#define | USB_FLAG_EP5_TIMER_OUT_ERR LL_USB_INT_STAT_EP5_TIMER_OUT_ERR
| USB ep5 timer out error flag More...
#define | USB_IT_ALL LL_USB_INT_EN_ALL
| USB all interrupt More...
#define | USB_IT_RESET_VAL LL_USB_INT_RESET_VAL
| USB interrupt control reset value More...
#define | USB_IT_SUSPEND LL_USB_INT_EN_SUSPEND
| USB suspend status interrupt More...
#define | USB_IT_EP0_OUT_READY LL_USB_INT_EN_EP0_OUT_READY
| USB ep0 data out ready interrupt More...
#define | USB_IT_EP1_OUT_READY LL_USB_INT_EN_EP1_OUT_READY
| USB ep1 data out ready interrupt More...
#define | USB_IT_CRC16_ERR LL_USB_INT_EN_CRC16_ERR
| USB receive CRC error data interrupt More...
#define | USB_IT_UPID_ERR LL_USB_INT_EN_UPID_ERR
| USB receive unsupported PID interrupt More...
#define | USB_IT_TIMEOUT_ERR LL_USB_INT_EN_TIMEOUT_ERR
| USB rx/tx timeout error interrupt More...
#define | USB_IT_SEQ_ERR LL_USB_INT_EN_SEQ_ERR
| USB DATA0/DATA1 PID sequence error interrupt More...
#define | USB_IT_PID_CKS_ERR LL_USB_INT_EN_PID_CKS_ERR
| USB PID checksum error interrupt More...
#define | USB_IT_PID_CRC_ERR LL_USB_INT_EN_PID_CRC_ERR
| USB PID CRC error interrupt More...
#define | USB_IT_HOST_RESET LL_USB_INT_EN_HOST_RESET
| USB host reset interrupt More...
#define | USB_IT_AHB_XFER_ERR LL_USB_INT_EN_AHB_XFER_ERR
| USB ep3 and ep4 AHB master receive error interrupt More...
#define | USB_IT_NSE_ERR LL_USB_INT_EN_NSE_ERR
| USB no such endpoint error interrupt More...
#define | USB_IT_EP3_AHB_XFER_DONE LL_USB_INT_EN_EP3_AHB_XFER_DONE
| USB ep3 AHB master transfer done interrupt More...
#define | USB_IT_SYNC_ERR LL_USB_INT_EN_SYNC_ERR
| USB SYNC error interrupt More...
#define | USB_IT_BIT_STUFF_ERR LL_USB_INT_EN_BIT_STUFF_ERR
| USB bit stuff error interrupt More...
#define | USB_IT_BYTE_ERR LL_USB_INT_EN_BYTE_ERR
| USB byte error interrupt More...
#define | USB_IT_SOF LL_USB_INT_EN_SOF
| USB SOF interrupt More...
#define | USB_IT_EP0_TX_DONE LL_USB_INT_EN_EP0_TX_DONE
| USB ep0 TX done interrupt More...
#define | USB_IT_EP2_TX_DONE LL_USB_INT_EN_EP2_TX_DONE
| USB ep2 TX done interrupt More...
#define | USB_IT_EP3_TX_DONE LL_USB_INT_EN_EP3_TX_DONE
| USB ep3 TX done interrupt More...
#define | USB_IT_INTO_CONFIG LL_USB_INT_EN_INTO_CONFIG
| USB into cofig status interrupt More...
#define | USB_IT_EP5_OUT_READY LL_USB_INT_EN_EP5_OUT_READY
| USB ep5 data out ready interrupt More...
#define | USB_IT_EP4_AHB_XFER_DONE LL_USB_INT_EN_EP4_AHB_XFER_DONE
| USB ep4 AHB master transfer done interrupt More...
#define | USB_IT_EP4_TX_DONE LL_USB_INT_EN_EP4_TX_DONE
| USB ep4 TX done interrupt More...
#define | USB_IT_EP5_AHB_XFER_DONE LL_USB_INT_EN_EP5_AHB_XFER_DONE
| USB ep5 AHB master transfer done interrupt More...
#define | USB_IT_EP5_TIMER_OUT_ERR LL_USB_INT_EN_EP5_TIMER_OUT_ERR
| USB ep5 timer out error interrupt More...
#define | USB_IT_CLR_ALL LL_USB_INT_CLR_ALL
| USB all interrupt clear More...
#define | USB_IT_CLR_SUSPEND LL_USB_INT_CLR_SUSPEND
| USB suspend status interrupt clear More...
#define | USB_IT_CLR_EP0_OUT_READY LL_USB_INT_CLR_EP0_OUT_READY
| USB ep0 data out ready interrupt clear More...
#define | USB_IT_CLR_EP1_OUT_READY LL_USB_INT_CLR_EP1_OUT_READY
| USB ep1 data out ready interrupt clear More...
#define | USB_IT_CLR_CRC16_ERR LL_USB_INT_CLR_CRC16_ERR
| USB receive CRC error data interrupt clear More...
#define | USB_IT_CLR_UPID_ERR LL_USB_INT_CLR_UPID_ERR
| USB receive unsupported PID interrupt clear More...
#define | USB_IT_CLR_TIMEOUT_ERR LL_USB_INT_CLR_TIMEOUT_ERR
| USB rx/tx timeout error interrupt clear More...
#define | USB_IT_CLR_SEQ_ERR LL_USB_INT_CLR_SEQ_ERR
| USB DATA0/DATA1 PID sequence error interrupt clear More...
#define | USB_IT_CLR_PID_CKS_ERR LL_USB_INT_CLR_PID_CKS_ERR
| USB PID checksum error interrupt clear More...
#define | USB_IT_CLR_PID_CRC_ERR LL_USB_INT_CLR_PID_CRC_ERR
| USB PID CRC error interrupt clear More...
#define | USB_IT_CLR_HOST_RESET LL_USB_INT_CLR_HOST_RESET
| USB host reset interrupt clear More...
#define | USB_IT_CLR_AHB_XFER_ERR LL_USB_INT_CLR_AHB_XFER_ERR
| USB ep3 and ep4 AHB master receive error interrupt clear More...
#define | USB_IT_CLR_NSE_ERR LL_USB_INT_CLR_NSE_ERR
| USB no such endpoint error interrupt clear More...
#define | USB_IT_CLR_EP3_AHB_XFER_DONE LL_USB_INT_CLR_EP3_AHB_XFER_DONE
| USB ep3 AHB master transfer done interrupt clear More...
#define | USB_IT_CLR_SYNC_ERR LL_USB_INT_CLR_SYNC_ERR
| USB SYNC error interrupt clear More...
#define | USB_IT_CLR_BIT_STUFF_ERR LL_USB_INT_CLR_BIT_STUFF_ERR
| USB bit stuff error interrupt clear More...
#define | USB_IT_CLR_BYTE_ERR LL_USB_INT_CLR_BYTE_ERR
| USB byte error interrupt clear More...
#define | USB_IT_CLR_SOF LL_USB_INT_CLR_SOF
| USB SOF interrupt clear More...
#define | USB_IT_CLR_EP0_TX_DONE LL_USB_INT_CLR_EP0_TX_DONE
| USB ep0 TX done interrupt clear More...
#define | USB_IT_CLR_EP2_TX_DONE LL_USB_INT_CLR_EP2_TX_DONE
| USB ep2 TX done interrupt clear More...
#define | USB_IT_CLR_EP3_TX_DONE LL_USB_INT_CLR_EP3_TX_DONE
| USB ep3 TX done interrupt clear More...
#define | USB_IT_CLR_INTO_CONFIG LL_USB_INT_CLR_INTO_CONFIG
| USB into cofig status interrupt clear More...
#define | USB_IT_CLR_EP5_OUT_READY LL_USB_INT_CLR_EP5_OUT_READY
| USB ep5 data out ready interrupt clear More...
#define | USB_IT_CLR_EP4_AHB_XFER_DONE LL_USB_INT_CLR_EP4_AHB_XFER_DONE
| USB ep4 AHB master transfer done interrupt clear More...
#define | USB_IT_CLR_EP4_TX_DONE LL_USB_INT_CLR_EP4_TX_DONE
| USB ep4 TX done interrupt clear More...
#define | USB_IT_CLR_EP5_AHB_XFER_DONE LL_USB_INT_CLR_EP5_AHB_XFER_DONE
| USB ep5 AHB master transfer done interrupt clear More...
#define | USB_IT_CLR_EP5_TIMER_OUT_ERR LL_USB_INT_CLR_EP5_TIMER_OUT_ERR
| USB ep5 timer out error interrupt clear More...
#define | IS_USB_PWR_MODE(__MODE__)
| Check if USB PWR Mode is valid. More...
#define | IS_USB_SPEED(__MODE__)
| Check if USB speed Mode is valid. More...
#define | IS_USB_ENUM_TYPE(__TYPE__)
| Check if USB enumeration type is valid. More...
#define | __HAL_USB_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->state = HAL_USB_STATE_RESET)
| Reset USB handle states. More...
#define | __HAL_USB_ENABLE() ll_usb_enable()
| Enable the specified USB peripheral. More...
#define | __HAL_USB_DISABLE() ll_usb_disable()
| Disable the specified USB peripheral. More...
#define | __HAL_USB_ENABLE_SW_RST() SET_BITS(MCU_SUB->USB_SW_RST, MCU_SUB_USB_SW_RST_EN)
| Enable the specified USB peripheral software reset. More...
#define | __HAL_USB_DISABLE_SW_RST() CLEAR_BITS(MCU_SUB->USB_SW_RST, MCU_SUB_USB_SW_RST_EN)
| Disable the specified USB peripheral software reset. More...
#define | __HAL_USB_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BITS((__HANDLE__)->p_instance->INT_EN, (__INTERRUPT__))
| Enable the specified USB interrupts. More...
#define | __HAL_USB_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BITS((__HANDLE__)->p_instance->INT_EN, (__INTERRUPT__))
| Disable the specified USB interrupts. More...
#define | __HAL_USB_GET_FLAG(__HANDLE__, __FLAG__) ((READ_BITS((__HANDLE__)->p_instance->INT_STAT, (__FLAG__)) != 0) ? SET : RESET)
| Check whether the specified USB flag is set or not. More...
#define | __HAL_USB_CLEAR_FLAG(__HANDLE__, __FLAG__) SET_BITS((__HANDLE__)->p_instance->INT_CLR, (__FLAG__))
| Clear the specified USB flag. More...
#define | __HAL_USB_GET_EP0_OUT_DAT_RDY(__HANDLE__) ((READ_BITS((__HANDLE__)->p_instance->CTRL, USB_CTRL_EP0_OUT_DATA_RDY) != 0) ? SET : RESET)
| Check whether the specified USB flag is set or not. More...
#define | __HAL_USB_ENABLE_ADDR_STAT(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL,USB_CTRL_ADDR_STAT)
| Enable the specified USB in addressed status. More...
#define | __HAL_USB_ENABLE_CFG_STAT(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL,USB_CTRL_CFG_STAT)
| Enable the specified USB in configured status. More...
#define | __HAL_USB_CLEAR_EP0_IFIFO(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->EP0_1_CTRL,USB_EP0_CTRL_IFIFO_CLR)
| clear the specified USB EP0 IN FIFO. More...
#define | __HAL_USB_CLEAR_EP1_IFIFO(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->EP0_1_CTRL,USB_EP1_CTRL_IFIFO_CLR)
| clear the specified USB EP1 IN FIFO. More...
#define | __HAL_USB_ENABLE_DEV_REMOTE_WAKEUP(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL,USB_CTRL_DEV_REMOTE_WAKEUP)
| Enable the specified USB device remote_wakeup feature. More...
#define | __HAL_USB_DISABLE_DEV_REMOTE_WAKEUP(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL,USB_CTRL_DEV_REMOTE_WAKEUP)
| Disable the specified USB device remote_wakeup feature. More...
#define | __HAL_USB_ENABLE_EP5_DMA_READ(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->EP5_CTRL,USB_EP5_CTRL_AHBM_EN)
| Enable the specified USB EP5 DMA READ. More...
#define | __HAL_USB_DISABLE_EP5_DMA_READ(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->EP5_CTRL,USB_EP5_CTRL_AHBM_EN)
| Disable the specified USB EP5 DMA READ. More...
#define | __HAL_USB_SET_EP5_TIMER_VAL(__HANDLE__, __VAL__) MODIFY_REG((__HANDLE__)->p_instance->EP5_TIMER, USB_EP5_TIMER_VAL, (__VAL__));
| Set USB ep5 DMA recieve data time out value. More...
#define | __HAL_USB_SET_EP4_BURST_SIZE(__HANDLE__, __VAL__)
| Set USB ep4 DMA burst size value. More...

## Typedefs
typedef struct hw_enum_parm | hw_enum_parm_t
| USB hardware enumeration Structure definition. More...
typedef struct _usb_init | usb_init_t
| USB init Structure definition. More...
typedef struct _usb_handle | usb_handle_t
| USB handle Structure definition. More...
typedef struct _hal_usb_callback | hal_usb_callback_t
| HAL_USB Callback function definition. More...

## Enumerations
enum | hal_usb_state_t { HAL_USB_STATE_RESET = 0x00, HAL_USB_STATE_READY = 0x01, HAL_USB_STATE_BUSY = 0x02, HAL_USB_STATE_BUSY_HOST_REST = 0x12, HAL_USB_STATE_BUSY_ADDR = 0x22, HAL_USB_STATE_BUSY_CFG = 0x32, HAL_USB_STATE_ERROR = 0x04, HAL_USB_STATE_ERROR_CRC16 = 0x14, HAL_USB_STATE_ERROR_UPID = 0x24, HAL_USB_STATE_ERROR_TIMEOUT = 0x34, HAL_USB_STATE_ERROR_SEQ = 0x44, HAL_USB_STATE_ERROR_PID_CKS = 0x54, HAL_USB_STATE_ERROR_PID_CRC = 0x64, HAL_USB_STATE_ERROR_DMA_RX = 0x74, HAL_USB_STATE_ERROR_NSE = 0x84, HAL_USB_STATE_ERROR_SYNC = 0x94, HAL_USB_STATE_ERROR_BIT_STUFF = 0xA4, HAL_USB_STATE_ERROR_BYTE = 0xB4, HAL_USB_STATE_ERROR_EP5_TIMER = 0xC4, HAL_USB_STATE_ABORT = 0x08, HAL_USB_STATE_SUSPEND = 0x10 }
| HAL USB State Enumerations definition. More...
enum | hal_usb_ep_t { HAL_USB_EP0 = 0x00, HAL_USB_EP1 = 0x01, HAL_USB_EP2 = 0x02, HAL_USB_EP3 = 0x03, HAL_USB_EP4 = 0x04, HAL_USB_EP5 = 0x05 }
| HAL USB EP. More...

## Functions
hal_status_t | hal_usb_init (usb_handle_t *p_usb)
| Initialize the USB according to the specified parameters in the usb_init_t and initialize the associated handle. More...
hal_status_t | hal_usb_deinit (usb_handle_t *p_usb)
| De-initialize the USB peripheral. More...
void | hal_usb_msp_init (usb_handle_t *p_usb)
| Initialize the USB MSP. More...
void | hal_usb_msp_deinit (usb_handle_t *p_usb)
| De-initialize the USB MSP. More...
hal_status_t | hal_usb_reset (usb_handle_t *p_usb)
| usb modlue reset the basic configuration during host reset More...
uint8_t | hal_usb_get_connect_state (void)
| usb module gets whether the device is connected to the host. More...
hal_status_t | hal_usb_ep_write_start (usb_handle_t *p_usb, hal_usb_ep_t ep)
| usb ep start transmit data. More...
hal_status_t | hal_usb_ep_write_end (usb_handle_t *p_usb, hal_usb_ep_t ep)
| usbd inform host transmit data end. More...
hal_status_t | hal_usb_ep_read_start (usb_handle_t *p_usb, hal_usb_ep_t ep)
| usb ep start receive data. More...
hal_status_t | hal_usb_ep_read_end (usb_handle_t *p_usb, hal_usb_ep_t ep)
| usbd inform host receive data end. More...
hal_status_t | hal_usb_ep_transmit_dma (usb_handle_t *p_usb, hal_usb_ep_t ep, uint8_t *p_data, uint32_t length)
| Transmit an amount of data to USB endpoint in dma mode. More...
hal_status_t | hal_usb_ep_receive_dma (usb_handle_t *p_usb, hal_usb_ep_t ep, uint8_t *p_data, uint32_t length)
| Receive an amount of data to USB endpoint in dma mode. More...
hal_status_t | hal_usb_set_addr (usb_handle_t *p_usb, uint32_t addr)
| set USB devcice address. More...
uint32_t | hal_usb_get_addr (usb_handle_t *p_usb)
| get USB devcice address More...
hal_status_t | hal_usb_write_ep_fifo (usb_handle_t *p_usb, hal_usb_ep_t ep, uint32_t value, uint32_t ep4_wr_byte)
| write 32bit value to USB endpoit FIFO. More...
uint32_t | hal_usb_read_ep_fifo (usb_handle_t *p_usb, hal_usb_ep_t ep)
| read 32bit value from USB endpoit FIFO. More...
hal_status_t | hal_usb_set_ep_attr (usb_handle_t *p_usb, hal_usb_ep_t ep, uint32_t attr)
| set USB EP attribute. More...
uint32_t | hal_usb_get_ep_attr (usb_handle_t *p_usb, hal_usb_ep_t ep)
| get USB EP attribute setting. More...
hal_status_t | hal_usb_halt_ep (usb_handle_t *p_usb, hal_usb_ep_t ep)
| USB halt the endpoint. More...
hal_status_t | hal_usb_un_halt_ep (usb_handle_t *p_usb, hal_usb_ep_t ep)
| USB un halt the endpoint. More...
hal_status_t | hal_usb_set_and_unhalt_ep (usb_handle_t *p_usb, hal_usb_ep_t ep, uint32_t attr)
| USB un halt the endpoint and set the endpoint attribute. More...
uint32_t | hal_usb_get_ep0_rx_data_sum (usb_handle_t *p_usb)
| get USB EP0 received data sum. More...
uint32_t | hal_usb_get_it_flag (usb_handle_t *p_usb)
| get USB all interrupt status. More...
uint32_t | hal_usb_get_ep1_rx_data_sum (usb_handle_t *p_usb)
| get USB EP1 received data sum. More...
uint32_t | hal_usb_get_ep5_rx_data_sum (usb_handle_t *p_usb)
| get USB EP5 received data sum. More...
hal_status_t | hal_usb_set_cmd_ok (usb_handle_t *p_usb)
| send ok command to USB host(EP0). More...
hal_status_t | hal_usb_set_cmd_err (usb_handle_t *p_usb)
| send error command to USB host(EP0). More...
void | hal_usb_irq_handler (usb_handle_t *p_usb)
| Handle USB interrupt request. More...
void | hal_usb_attach_irq_handler (usb_handle_t *p_usb)
| Handle USB attach interrupt request. More...
void | hal_usb_detach_irq_handler (usb_handle_t *p_usb)
| Handle USB detach interrupt request. More...
void | hal_usb_attach_callback (usb_handle_t *p_usb)
| USB attach callback. More...
void | hal_usb_detach_callback (usb_handle_t *p_usb)
| USB detach callback. More...
void | hal_usb_suspend_callback (usb_handle_t *p_usb)
| usb suspend callback. More...
void | hal_usb_ep0_out_ready_callback (usb_handle_t *p_usb)
| usb EP0 output ready callback. More...
void | hal_usb_ep1_out_ready_callback (usb_handle_t *p_usb)
| usb EP1 output ready callback. More...
void | hal_usb_crc16_err_callback (usb_handle_t *p_usb)
| usb receive CRC error data callback. More...
void | hal_usb_upid_err_callback (usb_handle_t *p_usb)
| usb receive unsupported PID callback. More...
void | hal_usb_time_out_callback (usb_handle_t *p_usb)
| usb rx/tx timeout error callback. More...
void | hal_usb_seq_err_callback (usb_handle_t *p_usb)
| usb DATA0/DATA1 PID sequence error callback. More...
void | hal_usb_pid_cks_err_callback (usb_handle_t *p_usb)
| usb PID checksum error callback. More...
void | hal_usb_pid_crc_err_callback (usb_handle_t *p_usb)
| usb PID CRC error callback. More...
void | hal_usb_host_reset_callback (usb_handle_t *p_usb)
| usb host reset callback. More...
void | hal_usb_ahb_xfer_err_callback (usb_handle_t *p_usb)
| usb EP3 and EP4 AHB master receive ERROR response callback. More...
void | hal_usb_nse_err_callback (usb_handle_t *p_usb)
| usb no such endpoint error callback. More...
void | hal_usb_ep3_ahb_xfer_done_callback (usb_handle_t *p_usb)
| usb ep3 AHB master transfer done callback. More...
void | hal_usb_sync_err_callback (usb_handle_t *p_usb)
| usb SYNC error callback. More...
void | hal_usb_bit_stuff_err_callback (usb_handle_t *p_usb)
| usb bit stuff error callback. More...
void | hal_usb_byte_err_callback (usb_handle_t *p_usb)
| usb byte error callback. More...
void | hal_usb_sof_callback (usb_handle_t *p_usb)
| usb SOF interrupt callback. More...
void | hal_usb_ep0_tx_done_callback (usb_handle_t *p_usb)
| usb EP0 IN FIFO data has sent to host callback. More...
void | hal_usb_ep2_tx_done_callback (usb_handle_t *p_usb)
| usb EP2 IN FIFO data has sent to host callback. More...
void | hal_usb_ep3_tx_done_callback (usb_handle_t *p_usb)
| usb EP3 IN FIFO data has sent to host callback. More...
void | hal_usb_into_config_callback (usb_handle_t *p_usb)
| usb hardware enumeration into config status callback. More...
void | hal_usb_ep5_out_ready_callback (usb_handle_t *p_usb)
| usb EP5 output ready callback. More...
void | hal_usb_ep4_ahb_xfer_done_callback (usb_handle_t *p_usb)
| usb ep4 AHB master transfer done callback. More...
void | hal_usb_ep4_tx_done_callback (usb_handle_t *p_usb)
| usb EP4 IN FIFO data has sent to host callback. More...
void | hal_usb_ep5_ahb_xfer_done_callback (usb_handle_t *p_usb)
| usb ep5 AHB master transfer done callback. More...
void | hal_usb_ep5_timer_out_err_callback (usb_handle_t *p_usb)
| usb ep5 timer out error callback. More...
hal_usb_state_t | hal_usb_get_state (usb_handle_t *p_usb)
| Return the USB handle state. More...
uint32_t | hal_usb_get_error (usb_handle_t *p_usb)
| Return the USB error code. More...
hal_status_t | hal_usb_suspend_reg (usb_handle_t *p_usb)
| Suspend some registers related to USB configuration before sleep. More...
hal_status_t | hal_usb_resume_reg (usb_handle_t *p_usb)
| Restore some registers related to USB configuration after sleep. More...

## Detailed Description

Header file containing functions prototypes of USB HAL library.

Author
  BLE Driver Team

Attention

  ##### Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file gr55xx_hal_usb.h.