1.Allow multi users to access the same sensor device simultaneously.
2.Get real state of sensor device by cmd SNIOC_GET_STATE for users.
3.Get update state since last read by poll without timeout for users.
4.Sensor device will be activated when first user open and will close when
last user closed.
5.When multi users to access device, driver always set the minimum
sampling interval and latency to the sensor device and allow
downsampled for users above the minimum sampling interval.
6.The circbuffer will overwrite old data when buffer is full, so if users
don't read data soon, data will be lost, and the oldest data in circbuffer
are returned to the users.
7.Always read the last data in the circbuffer as initial value for new
users when the sensor device has not yet generated new data.
8.when user uses poll, if subscription interval is satisfied, the POLLIN
events is returned for each users.
9.When new user generate or the state of sensor device changed, the POLLPRI
will notify to all users.
10.Support multi advertisers to subscribe their own data as loop test.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
1.cmd:SNIOC_REGISTER with struct sensor_reginfo_s to register user sensor
2.cmd:SNIOC_UNREGISTER to unregister user sensor
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
1.Simplify buffer opeations to avoid frequent resize for batch and no-batch mode.
2.When sensor event is first generated, the buffer is initialized.
3.Remove and merge batch_number to buffer_number when device support batch mode.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Summary:
- I noticed that the hello (ELF) application causes a memory leak.
- Finally, I found that the data section is not deallocated.
- This commit fixes this issue.
Impact:
- ELF loader with CONFIG_ARCH_ADDRENV=n
Testing:
- Tested with the following configs
- sprensense:elf, esp32-devkitc:elf, sabre-6quad:elf
- spresense:wifi_smp, rv-virt:nsh64, sabre-6quad:netnsh
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
The putarea documentation originally suggested that provided buffer
contains just the rectangle to be updated.
The commit 664d45dcba changed the expected
behavior for lcd_framebuffer but failed to propagate this change to the
driver's documentation. Now the expected behavior is that the whole
frame is passed in buffer and it is driver's responsibility to pick the
correct pixels according to the provided rectangle coordinates.
This change requires update of the LCD drivers if they implement this
function.
Summary:
- I noticed that the hello (ELF) application causes a memory leak.
- Finally, I found that the data section is not deallocated.
- This commit fixes this issue.
Impact:
- None
Testing:
- Tested with spresense:wifi_smp, rv-virt:nsh64, sabre-6quad:netnsh
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
since IFF_DOWN is only used for request, not for status. Instead,
IFF_UP should be used to query the netdev status. The IFF_DOWN
related macros are also removed to avoid the confuse.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Make use of XCHG/BSWAP on x86, REV16 and REV on ARMv6-m and above,
and whatever other optimized instructions on other platforms.
Defines extra CONFIG variables, and removes the unused functions for
endian-swapping. Fixes some oversights in using the macros.
In order to support multiple LCD instances per board, add a pointer from
lcd_planeinfo_s to the lcd_dev_s which it belongs to. Also enhance the
putrun, getrun, putarea and getarea methods to pass through the
lcd_dev_s pointer to the respective device driver.
Port all LCD device drivers to this lcd_planeinfo_s extension.
Enhance SSD1306 driver to support multiple LCDs.
Signed-off-by: Michael Jung <michael.jung@secore.ly>