Ejemplo n.º 1
0
void usbevt_resume () {
#   if (MPIPE_USB_REMWAKE)
    mpipe.state = MPIPE_Idle;
	mpipeevt_rxinit(0);
	if (platform_ext.usb_wakeup != False) {
		sys_resume();
	}
#   endif
}
Ejemplo n.º 2
0
void usbevt_vbuson () {
/// The standard code turns-on the USB subsystem and generates a rising edge
/// on DP (D+) via reset-connect, which causes the host to enumerate this 
/// device as a 12 Mbps USB Full Speed Device.
    if (usb_enable() == kUSB_succeed){
        usb_reset();
        usb_connect();
    }
    if (platform_ext.usb_wakeup != False) {
        sys_resume();
    }
}
Ejemplo n.º 3
0
/*===========================================================================*
 *				try_resume_proc				     *
 *===========================================================================*/
static void try_resume_proc(struct mproc *rmp)
{
/* Resume the given process if possible. */
  int r;

  assert(rmp->mp_flags & PROC_STOPPED);

  /* If the process is blocked on a VFS call, do not resume it now. Most likely    * it will be unpausing, in which case the process must remain stopped.
   * Otherwise, it will still be resumed once the VFS call returns. If the
   * process has died, do not resume it either.
   */
  if (rmp->mp_flags & (VFS_CALL | EXITING))
	return;

  if ((r = sys_resume(rmp->mp_endpoint)) != OK)
	panic("sys_resume failed: %d", r);

  /* Also unset the unpaused flag. We can safely assume that a stopped process
   * need only be unpaused once, but once it is resumed, all bets are off.
   */
  rmp->mp_flags &= ~(PROC_STOPPED | UNPAUSED);
}