|
21 | 21 | LOG_MODULE_REGISTER(sensor_shell, CONFIG_SENSOR_LOG_LEVEL);
|
22 | 22 |
|
23 | 23 | #define SENSOR_GET_HELP \
|
24 |
| - "Get sensor data. Channel names are optional. All channels are read " \ |
25 |
| - "when no channels are provided. Syntax:\n" \ |
26 |
| - "<device_name> <channel name 0> .. <channel name N>" |
| 24 | + SHELL_HELP("Get sensor data.\n" \ |
| 25 | + "Channel names are optional. All channels are read when no channels are " \ |
| 26 | + "provided.", \ |
| 27 | + "<device_name> [<channel name 0> .. <channel name N>]") |
27 | 28 |
|
28 | 29 | #define SENSOR_STREAM_HELP \
|
29 |
| - "Start/stop streaming sensor data. Data ready trigger will be used if no triggers " \ |
30 |
| - "are provided. Syntax:\n" \ |
31 |
| - "<device_name> on|off <trigger name> incl|drop|nop" |
| 30 | + SHELL_HELP("Start/stop streaming sensor data.\n" \ |
| 31 | + "Data ready trigger will be used if no triggers are provided.", \ |
| 32 | + "<device_name> on|off <trigger name> incl|drop|nop") |
32 | 33 |
|
33 | 34 | #define SENSOR_ATTR_GET_HELP \
|
34 |
| - "Get the sensor's channel attribute. Syntax:\n" \ |
35 |
| - "<device_name> [<channel_name 0> <attribute_name 0> .. " \ |
36 |
| - "<channel_name N> <attribute_name N>]" |
| 35 | + SHELL_HELP("Get the sensor's channel attribute.", \ |
| 36 | + "<device_name> [<channel_name 0> <attribute_name 0> .. " \ |
| 37 | + "<channel_name N> <attribute_name N>]") |
37 | 38 |
|
38 | 39 | #define SENSOR_ATTR_SET_HELP \
|
39 |
| - "Set the sensor's channel attribute.\n" \ |
40 |
| - "<device_name> <channel_name> <attribute_name> <value>" |
| 40 | + SHELL_HELP("Set the sensor's channel attribute.", \ |
| 41 | + "<device_name> <channel_name> <attribute_name> <value>") |
41 | 42 |
|
42 |
| -#define SENSOR_INFO_HELP "Get sensor info, such as vendor and model name, for all sensors." |
| 43 | +#define SENSOR_INFO_HELP \ |
| 44 | + SHELL_HELP("Get sensor info, such as vendor and model name, for all sensors.", \ |
| 45 | + "<device_name>") |
43 | 46 |
|
44 | 47 | #define SENSOR_TRIG_HELP \
|
45 |
| - "Get or set the trigger type on a sensor. Currently only supports `data_ready`.\n" \ |
46 |
| - "<device_name> <on/off> <trigger_name>" |
| 48 | + SHELL_HELP("Get or set the trigger type on a sensor.\n" \ |
| 49 | + "Currently only supports `data_ready`.", \ |
| 50 | + "<device_name> <on/off> <trigger_name>") |
47 | 51 |
|
48 | 52 | static const char *const sensor_channel_name[SENSOR_CHAN_COMMON_COUNT] = {
|
49 | 53 | [SENSOR_CHAN_ACCEL_X] = "accel_x",
|
|
0 commit comments