Structure for enabling or disabling a sensor.
typedef union {
sensor_devctl_enable_tx_t tx;
} sensor_devctl_enable_u;
BlackBerry 10.0.0
The union sensor__devctl__enable__u is used with the DCMD_SENSOR_ENABLE device command to enable/disable the sensor, based on the value of tx.enable.
sensor_devctl_enable_u enSensor;
enSensor.tx.enable = 1; // 1 = enable, 0 = disable
result = devctl(fd, DCMD_SENSOR_ENABLE, &enSensor, sizeof(enSensor),
NULL);
where: result is EOK for success (or see errno return code descriptions).