[−][src]Type Definition mynewt::hw::sensor::sensor_data_func_t
type sensor_data_func_t = Option<unsafe extern "C" fn(arg1: *mut sensor, arg2: *mut c_void, arg3: *mut c_void, arg4: sensor_type_t) -> c_int>;
Callback for handling sensor data, specified in a sensor listener.
sensor
: The sensor for which data is being returnedarg
: The argument provided to sensor_read() function.data
: A single sensor reading for that sensor listenertype
: The sensor type for the data function
Return: 0 on success, non-zero error code on failure.