sensors: send a single "current state" evt to new subscribers to onchange sensors

Sensors must now implement sensorSendOneDirectEvt() callback or handle the
EVT_APP_SENSOR_SEND_ONE_DIR_EVT event if they support ondemant data
reporting. This will be sent to them whena new client subscribes to on-
demand sensor in that mode. On receiving this, they are expected to
send a direct event to the given tid with the last knows state of the
sensor. This is consistent with how android handles ondemand sensors.

This also at sensor subscribe time determines if sensor supports ondemand
and onchange, and saves thsi state to use to decide whether to allow
triggers and sending event on subscribe

Change-Id: I6794405acab920de943894448ab21d3ed7128441
3 files changed
tree: b4028836e2d9e756292beb2bc4338756cac4ee63
  1. .gitignore
  2. CodingStandard.txt
  3. firmware/
  4. util/