A battery-powered device plugged into the bus can get its power from the bus if it meets the tests above, and it can then switch back over to battery power when it is disconnected from the bus or when the host is shut down. When a device is in suspend mode, it cannot draw any more than 500uA from the bus if it is bus-powered. Also, if a device has not seen any activity on its bus in 3 mS, it needs to go into suspend mode. A host can initiate a resume command to a device that is in suspend mode. A device can also issue a remote wakeup to an inactive host to make it active.
All devices have endpoints, which are memory buffers.
There may be multiple endpoints inside a device. It must be able to both send and receive data, but can only communicate in one direction at a time. Typically, when a device receives data such as an Out or Setup command from the host, this data is stored in the endpoint and the device's microprocessor is interrupted and works on this data. When a device receives an In command that is addressed to it from the host, data for the host that is stored in the endpoint is sent to the host. The host is considered to be the master in most all cases.