Exemple #1
0
void usb_remove_int(void)
{
    usb_status = USB_EXTRACTED;
#ifdef USB_STATUS_BY_EVENT
    usb_status_event(USB_EXTRACTED);
#endif
}
Exemple #2
0
void usb_insert_int(void)
{
    usb_status = USB_INSERTED;
#ifdef USB_STATUS_BY_EVENT
    usb_status_event(USB_INSERTED);
#endif
}
Exemple #3
0
void usb_connect_event(void)
{
    int status = usb_plugged() ? USB_INSERTED : USB_EXTRACTED;
    usb_status = status;
    /* Notify power that USB charging is potentially available */
    charger_usb_detect_event(status);
    usb_status_event((status == USB_INSERTED) ? USB_POWERED : USB_UNPOWERED);
}
void usb_drv_usb_detect_event(void)
{
#if (CONFIG_CPU != AS3525v2 || defined(USE_ROCKBOX_USB)) \
    && defined (USB_STATUS_BY_EVENT)
/* Rebooting on USB plug can crash these players in a state where
 * hardware power off (pressing the power button) doesn't work anymore
 * TODO: Implement USB in rockbox for these players */
    int oldstatus = disable_irq_save(); /* May come via USB thread */

    if (usb_status == USB_INSERTED)
        usb_status_event(USB_HOSTED);

    restore_irq(oldstatus);
#endif
}
Exemple #5
0
void usb_start_monitoring(void)
{
    int oldstatus = disable_irq_save(); /* Sync to event */
    int status = usb_detect();

    usb_monitor_enabled = true;

#ifdef USB_DETECT_BY_DRV
    status = (status == USB_INSERTED) ? USB_POWERED : USB_UNPOWERED;
#endif
    usb_status_event(status);

#ifdef USB_FIREWIRE_HANDLING
    if (firewire_detect())
        usb_firewire_connect_event();
#endif

    restore_irq(oldstatus);
}
Exemple #6
0
/* Called during the bus reset interrupt when in detect mode */
void usb_drv_usb_detect_event(void)
{
    if (usb_drv_powered())
        usb_status_event(USB_INSERTED);
}
void usb_drv_usb_detect_event()
{
    usb_status_event(USB_HOSTED);
}
void usb_remove_int(void)
{
    usb_status_event(USB_EXTRACTED);
}
void usb_insert_int(void)
{
    usb_status_event(USB_INSERTED);
}
Exemple #10
0
void usb_drv_usb_detect_event()
{
    usb_status_event(USB_INSERTED);
}
Exemple #11
0
void usb_remove_int(void)
{
    usb_status_event(USB_UNPOWERED);
}
Exemple #12
0
void usb_insert_int(void)
{
    usb_status_event(USB_POWERED);
}