static void run_test_downstream_disconnection(const struct test_case *test) { uhc_suspend(false); delay_ms(30); uhc_resume(); CHECK_EVENT_DISCONNECTION(); }
static void run_test_downstream(const struct test_case *test) { uhc_suspend(false); delay_ms(30); uhc_resume(); CHECK_EVENT_WAKEUP(); }
/** * \brief Interrupt handler for interrupt pin change */ static void UI_WAKEUP_HANDLER(void) { if (uhc_is_suspend()) { ui_disable_asynchronous_interrupt(); /* Wakeup host and device */ uhc_resume(); } }
/* Interrupt on "pin change" from RIGHT CLICK to do wakeup on USB * Note: * This interrupt is enable when the USB host enable remotewakeup feature * This interrupt wakeup the CPU if this one is in idle mode */ static void ui_wakeup_handler(uint32_t id, uint32_t mask) { if (RESUME_PIO_ID == id && RESUME_PIO_MASK == mask) { if (uhc_is_suspend()) { ui_disable_asynchronous_interrupt(); /* Wakeup host and device */ uhc_resume(); } } }
/** * \brief Interrupt handler for interrupt pin change */ static void UI_WAKEUP_HANDLER(void) { if (ui_b_host_mode) { if (uhc_is_suspend()) { ui_disable_asynchronous_interrupt(); /* Wakeup the devices connected */ uhc_resume(); } } else { /* In device mode, wakeup the USB host. */ udc_remotewakeup(); } }
/** * \brief Interrupt handler for interrupt pin change */ static void UI_WAKEUP_HANDLER(void) { sysclk_enable_peripheral_clock(EIC); if (eic_line_interrupt_is_pending(EIC, UI_WAKEUP_EIC_LINE)) { eic_line_clear_interrupt(EIC, UI_WAKEUP_EIC_LINE); if (uhc_is_suspend()) { ui_disable_asynchronous_interrupt(); /* Wakeup host and device */ uhc_resume(); } } sysclk_disable_peripheral_clock(EIC); }
/** * \brief Interrupt handler for interrupt pin change */ static void UI_WAKEUP_HANDLER(void) { sysclk_enable_peripheral_clock(EIC); if (eic_line_interrupt_is_pending(EIC, UI_WAKEUP_EIC_LINE)) { eic_line_clear_interrupt(EIC, UI_WAKEUP_EIC_LINE); if (ui_b_host_mode) { if (!uhc_is_suspend()) { /* USB is not in suspend mode * Let's interrupt enable. */ return; } ui_disable_asynchronous_interrupt(); /* Wakeup the devices connected */ uhc_resume(); } else { /* In device mode, wakeup the USB host. */ udc_remotewakeup(); } } sysclk_disable_peripheral_clock(EIC); }