ccxtechnologies / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
0 stars 0 forks source link

INA260 Power Sensor multiple access power-downs #37

Closed CFD2 closed 2 years ago

CFD2 commented 2 years ago

Summary

The power sensor (INA260) driver opened multiple times for the same file descriptor shuts down the sensor when getting closed.

Steps

start the app with infinite read: ina260 -d /dev/ina260 -r 0 start another process with fewer reads: ina260 -d /dev/ina260 -r 5 The second process finishes read operations, it closes the device file. ina260_close() function makes the device go into power-down operating mode. The first app continues to run and print measurements which values do not change anymore.