mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-19 15:40:41 +00:00
ohci: Disable MIE interrupt during IRQ processing, zero HccADoneHead on completion
This commit is contained in:
parent
75f6583c1c
commit
4e2afdf5e1
@ -606,6 +606,7 @@ static void done_queue_isr(uint8_t hostid)
|
||||
|
||||
// done head is written in reversed order of completion --> need to reverse the done queue first
|
||||
ohci_td_item_t* td_head = list_reverse ( (ohci_td_item_t*) tu_align16(ohci_data.hcca.done_head) );
|
||||
ohci_data.hcca.done_head = 0;
|
||||
|
||||
while( td_head != NULL )
|
||||
{
|
||||
@ -652,6 +653,9 @@ void hcd_int_handler(uint8_t hostid)
|
||||
|
||||
if (int_status == 0) return;
|
||||
|
||||
// Disable MIE as per OHCI spec 5.3
|
||||
OHCI_REG->interrupt_disable = OHCI_INT_MASTER_ENABLE_MASK;
|
||||
|
||||
// Frame number overflow
|
||||
if ( int_status & OHCI_INT_FRAME_OVERFLOW_MASK )
|
||||
{
|
||||
@ -694,6 +698,8 @@ void hcd_int_handler(uint8_t hostid)
|
||||
}
|
||||
|
||||
OHCI_REG->interrupt_status = int_status; // Acknowledge handled interrupt
|
||||
|
||||
OHCI_REG->interrupt_enable = OHCI_INT_MASTER_ENABLE_MASK; // Enable MIE
|
||||
}
|
||||
//--------------------------------------------------------------------+
|
||||
// HELPER
|
||||
|
Loading…
x
Reference in New Issue
Block a user