Commit 32aa66d5 authored by Maureen Helm's avatar Maureen Helm Committed by Carles Cufi
Browse files

samples: sensor: Enable sensor info shell command



Enables the new sensor info shell command in the sensor shell sample
application and documents its usage.

Signed-off-by: default avatarMaureen Helm <maureen.helm@intel.com>
parent eef0e1a1
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ Shell Module Command Help
     get   :Get sensor data. Channel names are optional. All channels are read when
            no channels are provided. Syntax:
            <device_name> <channel name 0> .. <channel name N>
     info  :Get sensor info, such as vendor and model name, for all sensors.


**get**: prints all the sensor channels data for a given sensor device name.
Optionally, a single channel name or index can be passed to be printed out. The
@@ -54,3 +56,14 @@ Output example (reel_board):
   undefined behavior like hardware exception. This happens because the shell
   subsystem runs in supervisor mode where API callbacks are not checked before
   being called.

**info**: prints vendor, model, and friendly name information for all sensors.
This command depends on enabling :kconfig:option:`CONFIG_SENSOR_INFO`.

.. code-block:: console

   uart:~$ sensor info
   device name: apds9960@39, vendor: [Avago Technologies], model: [apds9960], friendly name: []
   device name: mma8652fc@1d, vendor: [NXP Semiconductors], model: [fxos8700], friendly name: []
   device name: ti_hdc@43, vendor: [Texas Instruments], model: [hdc], friendly name: []
   device name: temp@4000c000, vendor: [Nordic Semiconductor], model: [nrf-temp], friendly name: []
+1 −0
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@ CONFIG_SHELL=y
CONFIG_BOOT_BANNER=n
CONFIG_SENSOR=y
CONFIG_SENSOR_SHELL=y
CONFIG_SENSOR_INFO=y