[−][src]Function mynewt::hw::sensor::sensor_register_listener
pub unsafe extern "C" fn sensor_register_listener(
sensor: *mut sensor,
listener: *mut sensor_listener
) -> c_int
Register a sensor listener. This allows a calling application to receive callbacks for data from a given sensor object.
For more information on the type of callbacks available, see the documentation for the sensor listener structure.
sensor
: The sensor to register a listener onlistener
: The listener to register onto the sensor
Return: 0 on success, non-zero error code on failure.