mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
refactor(console): Use esp_hal_usb APIs in USB console
Also remove unused usb_reg.h and usb_struct.h Closes https://github.com/espressif/esp-idf/issues/12710 Preparation for https://github.com/espressif/esp-idf/issues/18992
This commit is contained in:
@@ -319,6 +319,17 @@ static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t in
|
||||
hw->gintsts_reg.val = intr_msk;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reads the pending interrupts, i.e. those which are both asserted and unmasked
|
||||
*
|
||||
* @param hw Start address of the DWC_OTG registers
|
||||
* @return uint32_t Mask of pending interrupts
|
||||
*/
|
||||
static inline uint32_t usb_dwc_ll_gintsts_read_pending_intrs(usb_dwc_dev_t *hw)
|
||||
{
|
||||
return hw->gintsts_reg.val & hw->gintmsk_reg.val;
|
||||
}
|
||||
|
||||
// --------------------------- GINTMSK Register --------------------------------
|
||||
|
||||
static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask)
|
||||
|
||||
@@ -337,6 +337,17 @@ static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t in
|
||||
hw->gintsts_reg.val = intr_msk;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reads the pending interrupts, i.e. those which are both asserted and unmasked
|
||||
*
|
||||
* @param hw Start address of the DWC_OTG registers
|
||||
* @return uint32_t Mask of pending interrupts
|
||||
*/
|
||||
static inline uint32_t usb_dwc_ll_gintsts_read_pending_intrs(usb_dwc_dev_t *hw)
|
||||
{
|
||||
return hw->gintsts_reg.val & hw->gintmsk_reg.val;
|
||||
}
|
||||
|
||||
// --------------------------- GINTMSK Register --------------------------------
|
||||
|
||||
static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask)
|
||||
|
||||
@@ -317,6 +317,17 @@ static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t in
|
||||
hw->gintsts_reg.val = intr_msk;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reads the pending interrupts, i.e. those which are both asserted and unmasked
|
||||
*
|
||||
* @param hw Start address of the DWC_OTG registers
|
||||
* @return uint32_t Mask of pending interrupts
|
||||
*/
|
||||
static inline uint32_t usb_dwc_ll_gintsts_read_pending_intrs(usb_dwc_dev_t *hw)
|
||||
{
|
||||
return hw->gintsts_reg.val & hw->gintmsk_reg.val;
|
||||
}
|
||||
|
||||
// --------------------------- GINTMSK Register --------------------------------
|
||||
|
||||
static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask)
|
||||
|
||||
@@ -317,6 +317,17 @@ static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t in
|
||||
hw->gintsts_reg.val = intr_msk;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reads the pending interrupts, i.e. those which are both asserted and unmasked
|
||||
*
|
||||
* @param hw Start address of the DWC_OTG registers
|
||||
* @return uint32_t Mask of pending interrupts
|
||||
*/
|
||||
static inline uint32_t usb_dwc_ll_gintsts_read_pending_intrs(usb_dwc_dev_t *hw)
|
||||
{
|
||||
return hw->gintsts_reg.val & hw->gintmsk_reg.val;
|
||||
}
|
||||
|
||||
// --------------------------- GINTMSK Register --------------------------------
|
||||
|
||||
static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask)
|
||||
|
||||
@@ -326,6 +326,17 @@ static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t in
|
||||
hw->gintsts_reg.val = intr_msk;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reads the pending interrupts, i.e. those which are both asserted and unmasked
|
||||
*
|
||||
* @param hw Start address of the DWC_OTG registers
|
||||
* @return uint32_t Mask of pending interrupts
|
||||
*/
|
||||
static inline uint32_t usb_dwc_ll_gintsts_read_pending_intrs(usb_dwc_dev_t *hw)
|
||||
{
|
||||
return hw->gintsts_reg.val & hw->gintmsk_reg.val;
|
||||
}
|
||||
|
||||
// --------------------------- GINTMSK Register --------------------------------
|
||||
|
||||
static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask)
|
||||
|
||||
Reference in New Issue
Block a user