HardwareEvent Enumeration

Defines named event flags to specify which events cause the system to awake from a sleep state.

Namespace: Microsoft.SPOT.Hardware
Assembly: Microsoft.SPOT.Hardware (in microsoft.spot.hardware.dll)

Syntax

[FlagsAttribute]
public enum HardwareEvent

Remarks

These flags allow users to choose which events cause the system to awake from a sleep state. These event flags can be bitwise OR'ed together to produce a set of events.

Members

  Member name Description
Charger The battery charger is connected or disconnected. This flag is used by the CLR to set the battery event for the managed code library Microsoft.SPOT.Hardware.dll. The Battery.WaitForEvent method uses this event to wake up when the charger is connected or disconnected.
FileSystemIO File input or output occurs; file system IO is completed. Handled by the CLR.
GeneralPurpose Events on General Purpose Input/Output (GPIO) ports and any number of peripherals that use a GPIO pin as an eventing mechanism, such as storage devices, touch panels, or network devices. Includes events from GPIO and GPIO-based peripherals, such as Media insert/remove, Network in-range events, Touch events, and Gesture and Power Level changes.
I2C Data is sent on the I2C bus. I2C events; an I2C transaction is available. Handled by the CLR.
OEMReserved1 Reserved for OEM-defined native events; can be defined by the device manufacturer.
OEMReserved2 Reserved for OEM-defined native events; can be defined by the device manufacturer.
SerialIn Serial port input is available; data is sent on the serial input bus. Handled by the CLR.
SerialOut Serial port output is available; data is sent on the serial output bus. Handled by the CLR.
Socket Data is sent over a socket; TCP/IP data is available.
Spi SPI input data is available; data is sent on the SPI bus. Currently not used, because SPI is currently synchronous from the managed code layer.
SystemTimer

A timer which is responsible for waking sleeping threads and eventing managed timers. This event is used by the system timer when a timeout is set, such as for thread sleeps or thread context switches.

If this event is not set in the PowerState.WakeupEvents property, or in the wakeupEvents parameter of the Sleep method call, then the system will not wake up for managed timers, managed-code thread context switches, thread sleeps, or timeouts.

Timer1 Timer1 is fired; it finishes. For user customizations for non-system timers.
Timer2 Timer2 is fired; it finishes. For user customizations for non-system timers.
USBIn USB input data is received; USB port input is available. Handled by the CLR.
USBOut USB output data is sent; USB port output is available. Handled by the CLR.

Version Information

Available in the .NET Micro Framework versions 4.0, 4.1, and 4.2.

See Also

Reference

Microsoft.SPOT.Hardware Namespace