Macros | |
#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... | |
#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.
__HANDLE__ | Specifies the USB Handle. |
None |
Definition at line 652 of file gr55xx_hal_usb.h.
#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.
__HANDLE__ | Specifies the USB Handle. |
None |
Definition at line 658 of file gr55xx_hal_usb.h.
#define __HAL_USB_CLEAR_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | SET_BITS((__HANDLE__)->p_instance->INT_CLR, (__FLAG__)) |
Clear the specified USB flag.
__HANDLE__ | Specifies the USB Handle. |
__FLAG__ | Specifies the flag to check. This parameter can be one of the following values:
|
None |
Definition at line 628 of file gr55xx_hal_usb.h.
#define __HAL_USB_DISABLE | ( | ) | ll_usb_disable() |
Disable the specified USB peripheral.
None |
Definition at line 475 of file gr55xx_hal_usb.h.
#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.
__HANDLE__ | Specifies the USB handle. |
None |
Definition at line 670 of file gr55xx_hal_usb.h.
#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.
__HANDLE__ | Specifies the USB Handle. |
None |
Definition at line 682 of file gr55xx_hal_usb.h.
#define __HAL_USB_DISABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | CLEAR_BITS((__HANDLE__)->p_instance->INT_EN, (__INTERRUPT__)) |
Disable the specified USB interrupts.
__HANDLE__ | Specifies the USB handle. |
__INTERRUPT__ | Specifies the interrupt source to disable. This parameter can be one of the following values:
|
None |
Definition at line 558 of file gr55xx_hal_usb.h.
#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.
None |
Definition at line 485 of file gr55xx_hal_usb.h.
#define __HAL_USB_ENABLE | ( | ) | ll_usb_enable() |
Enable the specified USB peripheral.
None |
Definition at line 470 of file gr55xx_hal_usb.h.
#define __HAL_USB_ENABLE_ADDR_STAT | ( | __HANDLE__ | ) | SET_BITS((__HANDLE__)->p_instance->CTRL,USB_CTRL_ADDR_STAT) |
Enable the specified USB in addressed status.
__HANDLE__ | Specifies the USB Handle. |
None |
Definition at line 640 of file gr55xx_hal_usb.h.
#define __HAL_USB_ENABLE_CFG_STAT | ( | __HANDLE__ | ) | SET_BITS((__HANDLE__)->p_instance->CTRL,USB_CTRL_CFG_STAT) |
Enable the specified USB in configured status.
__HANDLE__ | Specifies the USB Handle. |
None |
Definition at line 646 of file gr55xx_hal_usb.h.
#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.
__HANDLE__ | Specifies the USB handle. |
None |
Definition at line 664 of file gr55xx_hal_usb.h.
#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.
__HANDLE__ | Specifies the USB Handle. |
None |
Definition at line 676 of file gr55xx_hal_usb.h.
#define __HAL_USB_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | SET_BITS((__HANDLE__)->p_instance->INT_EN, (__INTERRUPT__)) |
Enable the specified USB interrupts.
__HANDLE__ | Specifies the USB Handle. |
__INTERRUPT__ | Specifies the interrupt source to enable. This parameter can be one of the following values:
|
None |
Definition at line 521 of file gr55xx_hal_usb.h.
#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.
None |
Definition at line 480 of file gr55xx_hal_usb.h.
#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.
__HANDLE__ | Specifies the USB Handle. |
The | new state of TRUE or FALSE. |
Definition at line 634 of file gr55xx_hal_usb.h.
#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.
__HANDLE__ | Specifies the USB Handle. |
__FLAG__ | Specifies the flag to check. This parameter can be one of the following values: |
The | new state of __FLAG__ (TRUE or FALSE).
|
Definition at line 593 of file gr55xx_hal_usb.h.
#define __HAL_USB_RESET_HANDLE_STATE | ( | __HANDLE__ | ) | ((__HANDLE__)->state = HAL_USB_STATE_RESET) |
Reset USB handle states.
__HANDLE__ | USB handle. |
None |
Definition at line 465 of file gr55xx_hal_usb.h.
#define __HAL_USB_SET_EP4_BURST_SIZE | ( | __HANDLE__, | |
__VAL__ | |||
) |
Set USB ep4 DMA burst size value.
__HANDLE__ | Specifies the USB Handle. |
__VAL__ | Specifies 0:ep4 DMA burst size value(32~1023). |
None |
Definition at line 697 of file gr55xx_hal_usb.h.
#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.
__HANDLE__ | Specifies the USB Handle. |
__VAL__ | Specifies 0:never timeout 1~1000ms. |
None |
Definition at line 690 of file gr55xx_hal_usb.h.