pub fn register_listener(sensor: SensorPtr, listener: SensorListener) -> i32 {    
    unsafe { assert!(LISTENER_INTERNAL.sl_sensor_type == 0) };  //  Make sure it's not used.
    //  Copy the caller's listener to the internal listener.
    unsafe { LISTENER_INTERNAL = listener };
    //  Pass the internal listener to the unsafe Mynewt API.
    unsafe { sensor_register_listener(sensor, &mut LISTENER_INTERNAL) }
}
///  Register a sensor listener. This allows a calling application to receive
///  callbacks for data from a given sensor object. This is the safe version of `sensor_register_listener()`
///  that copies the listener locally before passing to Mynewt.
///
///  For more information on the type of callbacks available, see the documentation
///  for the sensor listener structure.
///
///  `sensor`: The sensor to register a listener on.
///  `listener`: The listener to register onto the sensor.
///  Return 0 on success, non-zero error code on failure.
Register a sensor listener. This allows a calling application to receive
callbacks for data from a given sensor object. This is the safe version of `sensor_register_listener()`
that copies the listener locally before passing to Mynewt.

For more information on the type of callbacks available, see the documentation
for the sensor listener structure.

`sensor`: The sensor to register a listener on.
`listener`: The listener to register onto the sensor.
Return 0 on success, non-zero error code on failure.
Register a sensor listener . This allows a calling application to receive callbacks for data from a given sensor object . This is the safe version of ` sensor_register_listener () ` that copies the listener locally before passing to Mynewt . For more information on the type of callbacks available see the documentation for the sensor listener structure . ` sensor ` : The sensor to register a listener on . ` listener ` : The listener to register onto the sensor . Return 0 on success non - zero error code on failure .
pub fn register_listener(sensor: SensorPtr, listener: SensorListener) -> i32 {    
    unsafe { assert!(LISTENER_INTERNAL.sl_sensor_type == 0) };  //  Make sure it's not used.
    //  Copy the caller's listener to the internal listener.
    unsafe { LISTENER_INTERNAL = listener };
    //  Pass the internal listener to the unsafe Mynewt API.
    unsafe { sensor_register_listener(sensor, &mut LISTENER_INTERNAL) }
}
pub fn register_listener ( sensor : SensorPtr , listener : SensorListener ) -> i32 { unsafe { assert ! ( LISTENER_INTERNAL sl_sensor_type 0 ) } ; //  Make sure it's not used. //  Copy the caller's listener to the internal listener. unsafe { LISTENER_INTERNAL = listener } ; //  Pass the internal listener to the unsafe Mynewt API. unsafe { sensor_register_listener ( sensor , & mut LISTENER_INTERNAL ) } }
Register a sensor listener.
Register a sensor listener .
sensor
SensorPtr
listener
SensorListener
sensor
SensorPtr
listener
SensorListener