[−][src]Module mynewt::hw::sensor
Contains the Mynewt Sensor API for Rust, including the safe version of the API.
Auto-generated Rust bindings are in the bindings
module.
Modules
bindings | Contains the auto-generated Rust bindings for the Mynewt Sensor API |
Structs
Enums
SensorValueType | Represents the type and value of a sensor data value. |
Constants
Statics
LISTENER_INTERNAL | Define the listener function to be called after polling the sensor.
This is a static mutable copy of the listener passed in through |
SENSOR_LISTENERS | |
sensor_base_ts | |
sensor_mgr | |
sensor_notify_evt_area | |
sensor_notify_evt_pool | |
sensor_read_event |
Functions
as_untyped | Cast sensor data function from typed to untyped |
convert_sensor_data | Convert the sensor data received from Mynewt into a |
get_geolocation_data⚠ | Interpret |
get_temp_data⚠ | Interpret |
get_temp_raw_data⚠ | Interpret |
is_null_sensor⚠ | Return non-zero if sensor is NULL.
C API: |
is_null_sensor_data⚠ | Return non-zero if sensor data is NULL.
C API: |
mgr_find_next_bydevname | Search the sensor list and find the next sensor that corresponds to a given device name. |
new_sensor_listener | Return a new |
null_sensor⚠ | Return the NULL sensor.
C API: |
null_sensor_data_func | Define a default sensor data function in case there is none. |
null_sensor_value_func | Define a default sensor value function in case there is none. |
read | Read the data for sensor type "type," from the given sensor and return the result into the "value" parameter. |
register_listener | 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_clear_high_thresh⚠ | Clears the high threshold for a sensor |
sensor_clear_low_thresh⚠ | Clears the low threshold for a sensor |
sensor_get_device⚠ | Return the Mynewt device for the Mynewt sensor.
C API: |
sensor_get_type_traits_byname⚠ | Get the type traits for a sensor |
sensor_get_type_traits_bytype⚠ | Search the sensor type traits list for specific type of sensor |
sensor_init⚠ | Initialize a sensor |
sensor_itf_lock⚠ | Lock access to the sensor_itf specified by si. Blocks until lock acquired. |
sensor_itf_unlock⚠ | Unlock access to the sensor_itf specified by si. |
sensor_lock⚠ | Lock access to the sensor specified by sensor. Blocks until lock acquired. |
sensor_mgr_evq_get⚠ | Get the current eventq, the system is misconfigured if there is still no parent eventq. |
sensor_mgr_find_next⚠ | The sensor manager contains a list of sensors, this function returns the next sensor in that list, for which compare_func() returns successful (one). If prev_cursor is provided, the function starts at that point in the sensor list. |
sensor_mgr_find_next_bytype⚠ | Find the "next" sensor available for a given sensor type. |
sensor_mgr_lock⚠ | Lock sensor manager to access the list of sensors |
sensor_mgr_match_bytype⚠ | Check if sensor type matches |
sensor_mgr_put_interrupt_evt⚠ | Puts a interrupt event on the sensor manager evq |
sensor_mgr_put_notify_evt⚠ | Puts a notification event on the sensor manager evq |
sensor_mgr_put_read_evt⚠ | Puts read event on the sensor manager evq |
sensor_mgr_register⚠ | Register the sensor with the global sensor list. This makes the sensor searchable by other packages, who may want to look it up by type. |
sensor_mgr_unlock⚠ | Unlock sensor manager once the list of sensors has been accessed |
sensor_oic_tx_trigger⚠ | Transmit OIC trigger |
sensor_pkg_init⚠ | Package init function. Remove when we have post-kernel init stages. |
sensor_register_err_func⚠ | Register a sensor error callback. The callback is executed when the sensor manager fails to read from the given sensor. |
sensor_register_listener⚠ | Register a sensor listener. This allows a calling application to receive callbacks for data from a given sensor object. |
sensor_register_notifier⚠ | Register a sensor notifier. This allows a calling application to receive callbacks any time a requested event is observed. |
sensor_reset⚠ | Resets the sensor |
sensor_set_n_poll_rate⚠ | Set the sensor poll rate multiple based on the device name, sensor type |
sensor_set_thresh⚠ | Set the thresholds along with the comparison algo for a sensor |
sensor_trigger_init⚠ | Sensor trigger initialization |
sensor_unlock⚠ | Unlock access to the sensor specified by sensor. |
sensor_unregister_listener⚠ | Un-register a sensor listener. This allows a calling application to clear callbacks for a given sensor object. |
sensor_unregister_notifier⚠ | Un-register a sensor notifier. This allows a calling application to stop receiving callbacks for events on the sensor object. |
set_poll_rate_ms | Set the sensor poll rate |
wrap_sensor_listener | Wrapped Sensor Listener that converts Mynewt |
Type Definitions
SensorValueFunc | Wrapped version of |
__int16_t | |
__int32_t | |
__int64_t | |
__uint8_t | |
__uint16_t | |
__uint32_t | |
os_dev_close_func_t | |
os_dev_init_func_t | Initialize a device. |
os_dev_open_func_t | |
os_dev_resume_func_t | |
os_dev_suspend_func_t | |
os_event_fn | |
os_membuf_t | |
os_sanity_check_func_t | |
os_stack_t | |
os_task_func_t | |
os_time_t | |
sensor_arg | Points to sensor arg passed by Mynewt to sensor listener |
sensor_clear_trigger_thresh_t | Clear the high/low threshold values for a specific sensor for the sensor type. |
sensor_data_func | Sensor data function that returns |
sensor_data_func_t | Callback for handling sensor data, specified in a sensor listener. |
sensor_data_func_untyped | Sensor data function that returns |
sensor_data_ptr | Points to sensor data passed by Mynewt to sensor listener |
sensor_error_func_t | Callback for reporting a sensor read error. |
sensor_event_type_t | |
sensor_get_config_func_t | Get the configuration of the sensor for the sensor type. This includes the value type of the sensor. |
sensor_handle_interrupt_t | Let driver handle interrupt in the sensor context |
sensor_mgr_compare_func_t | |
sensor_notifier_func_t | Callback for event notifications. |
sensor_ptr | Points to a |
sensor_read_func_t | Read a single value from a sensor, given a specific sensor type (e.g. SENSOR_TYPE_PROXIMITY). |
sensor_reset_t | Reset Sensor function Ptr |
sensor_set_config_func_t | Send a new configuration register set to the sensor. |
sensor_set_notification_t | Set the notification expectation for a targeted set of events for the specific sensor. After this function returns successfully, the implementer shall post corresponding event notifications to the sensor manager. |
sensor_set_trigger_thresh_t | Set the trigger and threshold values for a specific sensor for the sensor type. |
sensor_trigger_cmp_func_t | Callback for trigger compare functions. |
sensor_trigger_notify_func_t | Callback for sending trigger notification. |
sensor_type_t | |
sensor_unset_notification_t | Unset the notification expectation for a targeted set of events for the specific sensor. |