When its remote core publishes a message, all subscribed cores will receive the message,
but the local core "stublist" does not update the user's "generation" and "bufferpos" parameters.
Signed-off-by: likun17 <likun17@xiaomi.com>
After the ap core subscribes to the 25hz batch 120ms data of the sensor core, it switches
to the cp core and subscribes to the 50hz batch 120ms sensor core data. At this time,
the data subscribed by the AP will be abnormally lost (12.5hz). Mainly because ap
subscribes to sensor core data earlier than cp. The subscription of cp will be broadcast
to the ap core at the same time, and the corresponding "path" already exists
under "/dev/uorb" of ap. Thus the ap will create a "stub".
There are some restrictions on the creation of "stub" to avoid this situation.
Signed-off-by: likun17 <likun17@xiaomi.com>
1. notify POLLIN to reader.
2. notify POLLPRI to writer,
in addition, notify POLLPRI to the user who completed the flush .
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Supports the flush operation of the sensor.
The application can initiate a flush action through ioctl SNIOC_FLUSH
to trigger flush, and the call will be returned immediately.
Using SNIOC_GET_EVENTS to clear flush event,
However, the flush implementation is asynchronous, when all the flush
data is push to upper circbuffer, the POLLPRI event(FLUSH_COMPLETED)
will be reported.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
When there is an actual physical sensor, the driver must implement the get info interface. The upper layer can obtain the actual physical sensor information through SNIOC_GET_INFO.
SNIOC_SET_INFO can only set the information of the local virtual sensor, which means it is bound to the local advertisement. Remote subscribers cannot set the information.
Usage:
struct sensor_device_info dev_info;
orb_ioctl(fd, SNIOC_GET_INFO, (unsigned long)(uintptr_t)&dev_info);
or:
ret = orb_set_info(fd, &dev_info);
ret = orb_get_info(fd, &dev_info);
Signed-off-by: likun17 <likun17@xiaomi.com>
Basic amg88xx sensor handling (open, close, read, ioctl).
No interrupts supported. I intend to add support for this feature when I
gain more know-how on nuttx/posix.
This driver implements `read`, `write`, `open`, `close` and `ioctl`
interfaces to the SHT4X temperature and humidity sensor on an I2C bus.
The read implementation is that of a character driver for easy
debugging, while `ioctl` provides an interface to the sensor's raw data
collection and heating functionality.
Use private naming to avoid conflicts with user applications
In file included from libuv/src/unix/internal.h:25,
from libuv/src/unix/udp.c:23:
libuv/src/uv-common.h:57: warning: "container_of" redefined
57 | #define container_of(ptr, type, member) \
|
In file included from nuttx/include/nuttx/list.h:47,
from nuttx/include/nuttx/tls.h:40,
from nuttx/include/nuttx/sched.h:48,
from nuttx/include/nuttx/arch.h:87,
from nuttx/include/nuttx/userspace.h:35,
from nuttx/include/nuttx/mm/mm.h:30,
from nuttx/include/nuttx/kmalloc.h:34,
from nuttx/include/nuttx/lib/lib.h:31,
from nuttx/include/stdio.h:35,
from apps/system/libuv/libuv/include/uv.h:59,
from libuv/src/unix/udp.c:22:
nuttx/include/nuttx/nuttx.h:48: note: this is the location of the previous definition
48 | #define container_of(ptr, type, member) \
|
Signed-off-by: chao an <anchao@lixiang.com>