Skip to content

Commit

Permalink
driver/sensor: rename /dev/sensor -> /dev/uorb
Browse files Browse the repository at this point in the history
because this directory contains all topics by uorb using, not just sensors.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
  • Loading branch information
Donny9 committed Aug 8, 2022
1 parent dd718e7 commit 9bf3412
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion drivers/sensors/fakesensor.c
Expand Up @@ -359,7 +359,7 @@ static int fakesensor_thread(int argc, char** argv)
* Name: fakesensor_init
*
* Description:
* This function generates a sensor node under /dev/sensor/. And then
* This function generates a sensor node under /dev/uorb/. And then
* report the data from csv file.
*
* Input Parameters:
Expand Down
6 changes: 3 additions & 3 deletions drivers/sensors/sensor.c
Expand Up @@ -47,7 +47,7 @@
/* Device naming ************************************************************/

#define ROUND_DOWN(x, y) (((x) / (y)) * (y))
#define DEVNAME_FMT "/dev/sensor/sensor_%s%s%d"
#define DEVNAME_FMT "/dev/uorb/sensor_%s%s%d"
#define DEVNAME_UNCAL "_uncal"
#define TIMING_BUF_ESIZE (sizeof(unsigned long))

Expand Down Expand Up @@ -1074,7 +1074,7 @@ int sensor_register(FAR struct sensor_lowerhalf_s *lower, int devno)
* dev - A pointer to an instance of lower half sensor driver. This
* instance is bound to the sensor driver and must persists as long
* as the driver persists.
* path - The user specifies path of device. ex: /dev/sensor/xxx.
* path - The user specifies path of device. ex: /dev/uorb/xxx.
* esize - The element size of intermediate circular buffer.
*
* Returned Value:
Expand Down Expand Up @@ -1203,7 +1203,7 @@ void sensor_unregister(FAR struct sensor_lowerhalf_s *lower, int devno)
* dev - A pointer to an instance of lower half sensor driver. This
* instance is bound to the sensor driver and must persists as long
* as the driver persists.
* path - The user specifies path of device, ex: /dev/sensor/xxx
* path - The user specifies path of device, ex: /dev/uorb/xxx
****************************************************************************/

void sensor_custom_unregister(FAR struct sensor_lowerhalf_s *lower,
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensors/sensor_rpmsg.c
Expand Up @@ -1273,7 +1273,7 @@ static void sensor_rpmsg_device_created(FAR struct rpmsg_device *rdev,
*
* Input Parameters:
* lower - The instance of lower half sensor driver.
* path - The path of character node, ex: /dev/sensor/xxx.
* path - The path of character node, ex: /dev/uorb/xxx.
*
* Returned Value:
* The takeover rpmsg lowerhalf returned on success, NULL on failure.
Expand Down
2 changes: 1 addition & 1 deletion include/nuttx/sensors/fakesensor.h
Expand Up @@ -40,7 +40,7 @@ extern "C"
* Name: fakesensor_init
*
* Description:
* This function generates a sensor node under /dev/sensor/. And then
* This function generates a sensor node under /dev/uorb/. And then
* report the data from csv file.
*
* Input Parameters:
Expand Down
8 changes: 4 additions & 4 deletions include/nuttx/sensors/sensor.h
Expand Up @@ -45,7 +45,7 @@
* Some special sensor whose event size is not fixed or dynamically change,
* are called sensor of custom type. You should treat its events as byte
* streams and use sensor_custom_register to register character device
* with specific path, ex: "/dev/sensor/custom_dummy".
* with specific path, ex: "/dev/uorb/custom_dummy".
*/

#define SENSOR_TYPE_CUSTOM 0
Expand Down Expand Up @@ -1070,7 +1070,7 @@ int sensor_register(FAR struct sensor_lowerhalf_s *dev, int devno);
* dev - A pointer to an instance of lower half sensor driver. This
* instance is bound to the sensor driver and must persist as long
* as the driver persists.
* path - The user specifies path of device. ex: /dev/sensor/xxx.
* path - The user specifies path of device. ex: /dev/uorb/xxx.
* esize - The element size of intermediate circular buffer.
*
* Returned Value:
Expand Down Expand Up @@ -1109,7 +1109,7 @@ void sensor_unregister(FAR struct sensor_lowerhalf_s *dev, int devno);
* dev - A pointer to an instance of lower half sensor driver. This
* instance is bound to the sensor driver and must persists as long
* as the driver persists.
* path - The user specifies path of device, ex: /dev/sensor/xxx
* path - The user specifies path of device, ex: /dev/uorb/xxx
****************************************************************************/

void sensor_custom_unregister(FAR struct sensor_lowerhalf_s *dev,
Expand Down Expand Up @@ -1137,7 +1137,7 @@ int usensor_initialize(void);
*
* Input Parameters:
* lower - The instance of lower half sensor driver.
* path - The path of character node, ex: /dev/sensor/xxx.
* path - The path of character node, ex: /dev/uorb/xxx.
*
* Returned Value:
* The takeover rpmsg lowerhalf returned on success, NULL on failure.
Expand Down

0 comments on commit 9bf3412

Please sign in to comment.