31.08.2013 Views

HID Sensor Usage Tables - USB.org

HID Sensor Usage Tables - USB.org

HID Sensor Usage Tables - USB.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

86 <strong>HID</strong> <strong>Sensor</strong> <strong>Usage</strong>s<br />

TEMPERATURE<br />

<strong>Usage</strong><br />

0434 NONE 0 0434 TEMPERATURE<br />

TEMPERATURE 0434 CHANGE SENSITIVITY 1 1434 SENSITIVITY_ABS<br />

ABS<br />

(TEMPERATURE)<br />

TEMPERATURE 0434 MAX 2 2434 MAX(TEMPERATURE)<br />

TEMPERATURE 0434 MIN 3 3434 MIN(TEMPERATURE)<br />

TEMPERATURE 0434 THRESHOLD HIGH 6 6434 THRESHOLD_HIGH(TEMPERATURE)<br />

TEMPERATURE 0434 THRESHOLD LOW 7 7434 THRESHOLD_LOW(TEMPERATURE)<br />

TEMPERATURE 0434 CHANGE SENSITIVITY D D434 SENSITIVITY_RANGE_PCT<br />

RANGE PERCENT<br />

(TEMPERATURE)<br />

TEMPERATURE 0434 CHANGE SENSITIVITY E E434 SENSITIVITY_REL_PCT<br />

RELATIVE PERCENT<br />

(TEMPERATURE)<br />

Table 19. Modifier <strong>Usage</strong> example<br />

If MAX(TEMPERATURE) was defined to be +35.0, and the current temperature rose from a value below<br />

that until the point that it crossed it in an upward direction, then a “Max Temperature Exceeded” event is in<br />

effect.<br />

Whether or not the event is actually reported depends upon the setting of the Reporting State property:<br />

//begin reporting state selectors<br />

#define <strong>HID</strong>_USAGE_SENSOR_PROPERTY_REPORTING_STATE_NO_EVENTS 0x0A,0x40,0x08 // Sel<br />

#define <strong>HID</strong>_USAGE_SENSOR_PROPERTY_REPORTING_STATE_ALL_EVENTS 0x0A,0x41,0x08 // Sel<br />

#define <strong>HID</strong>_USAGE_SENSOR_PROPERTY_REPORTING_STATE_THRESHOLD_EVENTS 0x0A,0x42,0x08 // Sel<br />

#define <strong>HID</strong>_USAGE_SENSOR_PROPERTY_REPORTING_STATE_NO_EVENTS_WAKE 0x0A,0x43,0x08 // Sel<br />

#define <strong>HID</strong>_USAGE_SENSOR_PROPERTY_REPORTING_STATE_ALL_EVENTS_WAKE 0x0A,0x44,0x08 // Sel<br />

#define <strong>HID</strong>_USAGE_SENSOR_PROPERTY_REPORTING_STATE_THRESHOLD_EVENTS_WAKE 0x0A,0x45,0x08 // Sel<br />

//end reporting state selectors<br />

If the Reporting State selector is NO_EVENTS, then the event is not reported, it is discarded.<br />

If the Reporting State selector is ALL_EVENTS, then then the event is always reported.<br />

If the Reporting State selector is THRESHOLD_EVENTS, then the event is reported when it is a<br />

threshold exceeded event.<br />

If the Reporting State selector is one ending in _WAKE, then the sensor is asked to wake the Host<br />

CPU if it is asleep, and then send the event.<br />

The actual event ID that is reported depends upon the threshold event type that occurred:<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_UNKNOWN 0x00<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_STATE_CHANGED 0x01<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_PROPERTY_CHANGED 0x02<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_DATA_UPDATED 0x03<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_POLL_RESPONSE 0x04<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_CHANGE_SENSITIVITY 0x05<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_MAX_REACHED 0x06<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_MIN_REACHED 0x07<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_HIGH_THRESHOLD_CROSS_ABOVE 0x08<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_HIGH_THRESHOLD_CROSS_BELOW 0x09<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_LOW_THRESHOLD_CROSS_ABOVE 0x0A<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_LOW_THRESHOLD_CROSS_BELOW 0x0B<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_ZERO_THRESHOLD_CROSS_ABOVE 0x0C<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_ZERO_THRESHOLD_CROSS_BELOW 0x0D<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_PERIOD_EXCEEDED 0x0E<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_FREQUENCY_EXCEEDED 0x0F<br />

#define <strong>HID</strong>_USAGE_SENSOR_EVENT_COMPLEX_TRIGGER 0x10<br />

Examples:<br />

The MAX_REACHED event would be reported if the TEMPERATURE rose to the<br />

MAX(TEMPERATURE) threshold or higher.<br />

The MIN_REACHED event would be reported if the TEMPERATURE dropped to the<br />

MIN(TEMPERATURE) or lower.<br />

The HIGH_THRESHOLD_CROSS_ABOVE event would be reported if the TEMPERATURE<br />

rose from below the “upper threshold” [which could be defined by<br />

THRESHOLD_HIGH(TEMPERATURE), SENSITIVITY_RANGE_PCT(TEMPERATURE), or<br />

SENSITIVITY_REL_PCT(TEMPERATURE)] and crossed it in an upward direction.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!