add isr api for usbh_hcd

- void usbh_device_plugged_isr(uint8_t hostid, tusb_speed_t speed);
- void usbh_device_unplugged_isr(uint8_t hostid);

implement port_connect_status_isr
This commit is contained in:
hathach
2013-03-12 16:42:19 +07:00
parent c6b220c327
commit 80facf6f2e
6 changed files with 108 additions and 30 deletions

View File

@@ -327,6 +327,17 @@ enum ehci_usbcmd_pos_ {
EHCI_USBCMD_POS_INTERRUPT_THRESHOLD = 16
};
enum ehci_portsc_change_mask_{
EHCI_PORTSC_MASK_CONNECT_STATUS_CHANGE = BIT_(1),
EHCI_PORTSC_MASK_PORT_ENABLE_CHAGNE = BIT_(3),
EHCI_PORTSC_MASK_OVER_CURRENT_CHANGE = BIT_(5),
EHCI_PORTSC_MASK_ALL =
EHCI_PORTSC_MASK_CONNECT_STATUS_CHANGE |
EHCI_PORTSC_MASK_PORT_ENABLE_CHAGNE |
EHCI_PORTSC_MASK_OVER_CURRENT_CHANGE
};
typedef volatile struct {
union {
uint32_t usb_cmd ; ///< The Command Register indicates the command to be executed by the serial bus host controller. Writing to the register causes a command to be executed