HardwareEvent Enumeration

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  Microsoft.SPOT.Hardware
Assembly:  Microsoft.SPOT.Hardware (in Microsoft.SPOT.Hardware.dll)

Syntax

'Declaration
<FlagsAttribute> _
Public Enumeration HardwareEvent
[FlagsAttribute]
public enum HardwareEvent
[FlagsAttribute]
public enum class HardwareEvent
[<FlagsAttribute>]
type HardwareEvent
public enum HardwareEvent

Members

Member name Description
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.
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.
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 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.
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.
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 WaitForEvent method uses this event to wake up when the charger is connected or disconnected.
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.
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.

Remarks

These flags allow users to choose which events cause the system to awake from a sleep state. These event flags can be used with bitwise OR to specify a set of events.

See Also

Reference

Microsoft.SPOT.Hardware Namespace