Merge branch 'master' into add-max3421-esp32

This commit is contained in:
hathach
2023-09-27 17:52:18 +07:00
51 changed files with 1016 additions and 578 deletions

View File

@@ -859,8 +859,8 @@ void print_hirq(uint8_t hirq) {
#define print_hirq(hirq)
#endif
// Interrupt handler (extended)
void hcd_int_handler_ext(uint8_t rhport, bool in_isr) {
// Interrupt handler
void hcd_int_handler(uint8_t rhport, bool in_isr) {
uint8_t hirq = reg_read(rhport, HIRQ_ADDR, in_isr) & _hcd_data.hien;
if (!hirq) return;
// print_hirq(hirq);
@@ -916,9 +916,4 @@ void hcd_int_handler_ext(uint8_t rhport, bool in_isr) {
}
}
// Interrupt Handler
void hcd_int_handler(uint8_t rhport) {
hcd_int_handler_ext(rhport, true);
}
#endif

View File

@@ -656,8 +656,8 @@ void process_period_xfer_isr(uint8_t rhport, uint32_t interval_ms)
}
//------------- Host Controller Driver's Interrupt Handler -------------//
void hcd_int_handler(uint8_t rhport)
{
void hcd_int_handler(uint8_t rhport, bool in_isr) {
(void) in_isr;
ehci_registers_t* regs = ehci_data.regs;
uint32_t const int_status = regs->status;

View File

@@ -847,8 +847,10 @@ bool hcd_edpt_clear_stall(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr) {
/*-------------------------------------------------------------------
* ISR
*-------------------------------------------------------------------*/
void hcd_int_handler(uint8_t rhport)
void hcd_int_handler(uint8_t rhport, bool in_isr)
{
(void) in_isr;
uint_fast8_t is, txis, rxis;
is = USB0->IS; /* read and clear interrupt status */

View File

@@ -447,6 +447,10 @@ void hcd_port_reset(uint8_t rhport)
_hcd.need_reset = false;
}
void hcd_port_reset_end(uint8_t rhport) {
(void) rhport;
}
tusb_speed_t hcd_port_speed_get(uint8_t rhport)
{
(void)rhport;
@@ -583,8 +587,9 @@ bool hcd_edpt_clear_stall(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr) {
/*--------------------------------------------------------------------+
* ISR
*--------------------------------------------------------------------+*/
void hcd_int_handler(uint8_t rhport)
void hcd_int_handler(uint8_t rhport, bool in_isr)
{
(void) in_isr;
uint32_t is = KHCI->ISTAT;
uint32_t msk = KHCI->INTEN;

View File

@@ -667,8 +667,9 @@ static void done_queue_isr(uint8_t hostid)
}
}
void hcd_int_handler(uint8_t hostid)
{
void hcd_int_handler(uint8_t hostid, bool in_isr) {
(void) in_isr;
uint32_t const int_en = OHCI_REG->interrupt_enable;
uint32_t const int_status = OHCI_REG->interrupt_status & int_en;

View File

@@ -252,9 +252,9 @@ static void __tusb_irq_path_func(hcd_rp2040_irq)(void)
}
}
void __tusb_irq_path_func(hcd_int_handler)(uint8_t rhport)
{
void __tusb_irq_path_func(hcd_int_handler)(uint8_t rhport, bool in_isr) {
(void) rhport;
(void) in_isr;
hcd_rp2040_irq();
}

View File

@@ -771,8 +771,9 @@ bool hcd_edpt_clear_stall(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr) {
//--------------------------------------------------------------------+
// ISR
//--------------------------------------------------------------------+
void hcd_int_handler(uint8_t rhport)
{
void hcd_int_handler(uint8_t rhport, bool in_isr) {
(void) in_isr;
rusb2_reg_t* rusb = RUSB2_REG(rhport);
unsigned is0 = rusb->INTSTS0;
unsigned is1 = rusb->INTSTS1;

View File

@@ -51,8 +51,9 @@ bool hcd_init(uint8_t rhport) {
}
// Interrupt Handler
void hcd_int_handler(uint8_t rhport) {
void hcd_int_handler(uint8_t rhport, bool in_isr) {
(void) rhport;
(void) in_isr;
}
// Enable USB interrupt