How to wakeup PC?
How to wakeup PC?
I use infrahid on my Computer ,but i couldn't to wakeup pc when PC standby or Poweron,how to do ?help
You must generate a USB reset condition to wake up the PC. This is done with
You should only generate the reset if the PC is really in sleep mode. You can find out by checking for start of frame pulses on D-.
Code: Select all
usbDeviceDisconnect();
_delay_ms(10);
usbDeviceConnect();
You should only generate the reset if the PC is really in sleep mode. You can find out by checking for start of frame pulses on D-.
Sorry, what I have posted is NOT correct. I've re-read the spec and the resume signal is a differential "1", not SE0. The code should therefore look like this:
Code: Select all
cli();
USBOUT |= _BV(USB_CFG_DPLUS_BIT);
USBDDR |= _BV(USB_CFG_DPLUS_BIT) | _BV(USB_CFG_DMINUS_BIT);
_delay_ms(5); /* spec says min 1 ms, max 15 ms */
USBDDR &= ~(_BV(USB_CFG_DPLUS_BIT) | _BV(USB_CFG_DMINUS_BIT));
USBOUT &= ~_BV(USB_CFG_DPLUS_BIT);
sei();