Yanfeng Liu
9d6e2b97fb
video/fb: add munmap support
...
This adds support to user-space munmap() requests in kernel build.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-05 22:01:26 +08:00
Yanfeng Liu
041ef1d9ea
video/fb: kernel build framebuffer support
...
This supports running fb demo app in kernel build with new
config `rv-virt/kfb64`. The demo shows colored rectangles
in graphic window with the following console logs:
```
nsh> cat /proc/version
NuttX version 12.4.0 1ea10ddacc-dirty May 3 2024 07:03:59 rv-virt/kfb64
nsh> fb
VideoInfo:
fmt: 13
xres: 640
yres: 480
nplanes: 1
PlaneInfo (plane 0):
fbmem: 0x80218010
fblen: 1228800
stride: 2560
display: 0
bpp: 32
Mapped FB: 0xc2000010
0: ( 0, 0) (640,480)
1: ( 58, 43) (524,394)
2: (116, 86) (408,308)
3: (174,129) (292,222)
4: (232,172) (176,136)
5: (290,215) ( 60, 50)
Test finished
```
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-03 23:58:39 +08:00
Jukka Laitinen
9277be2503
Add configuration option for RTL8211F RGMII PHY
...
Also extend the "struct phy_desc_s" to support for 1GB PHY's, the speed
detection always needs more than one bit.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-05-02 16:30:41 -03:00
hujun5
e4d0f404f1
driver: There is no need to use sched_[un]lock
...
purpose:
1 sched_lock is very time-consuming, and reducing its invocations can improve performance.
2 sched_lock is prone to misuse, and narrowing its scope of use is to prevent people from referencing incorrect code and using it
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
We have also tested this patch on other ARM hardware platforms.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-30 11:35:13 -03:00
chao an
e4d4c67b78
serial/pl011: configurable clock frequency
...
move clock frequency into Kconfig
Signed-off-by: chao an <anchao@lixiang.com>
2024-04-30 17:26:39 +08:00
simbit18
7e30d38558
drivers/sensors/Kconfig: Added if SENSORS_BME680 for common dependency
...
sensor BME680: Added if SENSORS_BME680
2024-04-30 01:48:53 +08:00
raiden00pl
6621748fe8
sensors/bmi270_uorb.c: move init sequence to register function
...
otherwise default accel and gyro scale configured during registration is cleared
2024-04-28 21:31:39 +08:00
raiden00pl
322551b13b
sensors/adxl372_uorb: wait for data ready in thread
2024-04-28 13:21:54 +08:00
raiden00pl
a34007b81f
sensors/bmi270_uorb.c: fix condition for sensor stop
2024-04-28 13:21:54 +08:00
raiden00pl
1985dcd192
drivers/adxl362_uorb: various fixes
...
- fix compilation for fetch interface
- for data ready in thread
- add soft reset
2024-04-28 13:21:54 +08:00
raiden00pl
7a789d0775
sensors/bmm150_uorb.c: fix compilation for poll interface
2024-04-28 13:21:54 +08:00
raiden00pl
0f56d1df16
sensors/bh1749nuc_uorb.c: fix compilation when poll interface is disabled
2024-04-28 13:21:54 +08:00
anjiahao
0040e9a239
drivers/serial:support arm cmsdk drivers
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-04-26 18:42:35 -03:00
dongjiuzhu1
c093514cea
drivers/usbdev: Register the device after successful set configuration
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
443306793c
drivers/usbdev: support read ZLP packet
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
4bcad6115b
driver/usbdev: lock fs_ep resouce when call unbind
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
d6bfa87c8d
drivers/usbdev: support send ZLP(zero length packet) data packet in bulkin
...
status = write(g_usb_ep_in, (void*)0xFEE1DEAD, 0);
sched_backtrace
nuttx/arch/arm/src/../../../sched/sched/sched_backtrace.c:57
_assert
nuttx/arch/arm/src/../../../sched/misc/assert.c:659
__assert
nuttx/arch/arm/src/../../../libs/libc/assert/lib_assert.c:36
usbdev_fs_write
nuttx/arch/arm/src/../../../drivers/usbdev/usbdev_fs.c:770 (discriminator 1)
file_write
nuttx/arch/arm/src/../../../fs/vfs/fs_write.c:91
nx_write
nuttx/arch/arm/src/../../../fs/vfs/fs_write.c:148
ffs_transport_thread_usb_write
nuttx/arch/arm/src/../../../../external/mtp-responder/mtp-responder/src/mtp_usb_driver_nuttx.c:224
_transport_thread_usb_write
nuttx/arch/arm/src/../../../../external/mtp-responder/mtp-responder/src/mtp_usb_driver.c:80
pthread_startup
nuttx/arch/arm/src/../../../libs/libc/pthread/pthread_create.c:59 (discriminator 2)
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
2b571e1d11
drivers/usbdev: support config usb req buffer alignment bytes
...
we need to alloc req buffer in cacheline size units, othersize the
data may by incorrect.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
9ebed49d29
drivers/usbdev: update sem ptr before loop run
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
7feb547c6f
drivers/usbdev: stop read when container length is less than the maximum length.
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
0f269b1c2a
driver/usbdev: report POLLPRI event when usb connect
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
1355302036
drivers/usbdev_fs: update ctrlreq buffer len base on longest string descriptor
...
nuttx/mm/kasan/kasan.c:117
kasan_report
nuttx/mm/kasan/kasan.c:111
composite_mkstrdesc
nuttx/drivers/usbdev/composite.c:404
sunxi_ep0_disptach
nuttx/arch/arm/src/chip/drivers/rtos-hal/hal/source/usb/udc/udc.c:1287
up_common_handler
nuttx/arch/arm/src/chip/drivers/osal/src/hal_interrupt.c:10
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
070ecb480a
drivers/usbdev_fs: report POLLHUP when disconnect
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
sunkun3
e3a6368c9a
drivers/usbdev_fs: when the device is not opened, the received data is retained.
...
It is up to the app to determine whether the data is valid when opened
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
e2f1ccdefc
drivers/misc/rwbuffer: fix rwbuffer overflow issue
...
issue:
in rwb_wrflush():
memmove(rwb->wrbuffer + padblocks * rwb->blocksize,
rwb->wrbuffer, rwb->wrnblocks * rwb->blocksize);
when the offest from rwb->wrblockstart to startblock plus rwb->wrnblocks is greater
than rwb->wralignblocks, it will be causing memory overflow since rwb->wrbuffer is
allocated rwb.wrmaxblock(rwb.wralignblocks) blocks.
fix:
Let us ensure that the wrblockstart in rwbuffer must be aligned according to
wralignblocks after writing, so there is no need to perform memmove when flushing
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 10:28:52 +08:00
dongjiuzhu1
0d609c451b
Revert "fix: the bug about rwbuffer causing mem overflow"
...
This reverts commit e43aa99ae8
.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 10:28:52 +08:00
zhanghongyu
92cd1c3742
netdev_upperhalf: add L3 packet handle
...
To provide support for the received L3 network packets
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-04-22 23:44:37 +08:00
raiden00pl
41803a0c20
sensors/bh1749nuc: add support for the new sensor framework
...
bh1749nuc can be used with the new sensor framework
2024-04-21 14:48:28 -03:00
dongjiuzhu1
7c4e3aff14
drivers/usbdev/mtp: fix compile break
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-21 23:24:40 +08:00
dongjiuzhu1
e7fd416f9f
drivers/usbdev: support config pid/vid by soft interface
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-21 23:24:40 +08:00
anjiahao
ff4c6c33e8
usbdev:fix usbdev usbdev_fs_classuninitialize double free
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-04-21 23:21:54 +08:00
dongjiuzhu1
a8d7103a2b
drivers/usbdev: push cdcacm rx buffer to serial rx buffer when resetconfig
...
When usb is re-enumerated due to the reset signal, we need to push
the rx_pending message into the serial port buffer.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-21 23:21:54 +08:00
dongjiuzhu1
e5a925543b
drivers/usbdev: fix double free when cdcacm uninitialize with not used
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-21 23:21:54 +08:00
dongjiuzhu1
ad59ef075f
drivers/usbdev: remove first uninitialization and release resouce once.
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-21 23:21:54 +08:00
dongjiuzhu1
3b39ba72a4
drivers/usbdev: fix used after free when calling close after uninitialize
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-21 23:21:54 +08:00
dongjiuzhu1
9c55f21a6f
drivers/cdcacm/serial: add release interface to release uart_dev resource
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-21 23:21:54 +08:00
raiden00pl
5af805b2ef
sensors/bmi270: add support for the new sensor framework
...
bmi270 can be used with the new sensor framework
2024-04-21 19:06:18 +08:00
raiden00pl
3d765616ea
sensors/adxl372: add support for the new sensor framework
...
adxl372 can be used with the new sensor framework
2024-04-21 18:57:33 +08:00
hujun5
72548951d3
drivers: syslog: Replace sched_lock with critical section in syslog_flush_intbuffer()
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-21 11:40:01 +02:00
raiden00pl
db7c8be61f
sensors: add support for bmm150 magnetometer
...
add support for Bosch BMM150 Magnetometer
2024-04-20 16:20:43 -03:00
ChenChuang
e43aa99ae8
fix: the bug about rwbuffer causing mem overflow
...
when the offest from rwb->wrblockstart to startblock
plus rwb->wrnblocks is greater than rwb->wralignblocks,
it will be causing memory overflow since rwb->wrbuffer is
allocated rwb.wrmaxblock(rwb.wralignblocks) blocks.
2024-04-20 11:58:12 -03:00
raiden00pl
ebcf25b2f6
sensors: add support for adxl362 accelerometer
...
add support for Analog Devices ADXL362 accelerometer
2024-04-20 11:47:50 -03:00
chao an
d11b1ba9cb
drivers/serial/16550: remove unused function
...
drivers/serial/uart_16550.c:690:20: warning: unused function 'u16550_restoreuartint' [-Wunused-function]
static inline void u16550_restoreuartint(FAR struct u16550_s *priv,
^
Signed-off-by: chao an <anchao@lixiang.com>
2024-04-19 20:13:16 +08:00
simbit18
7677f10d3f
fix nxstyle
...
fix Relative file path does not match actual file.
2024-04-16 19:09:12 +08:00
Xiang Xiao
81c8f902b6
video: Move video_format_s from video.h to v4l2_cap.c
...
since it is only used in v4l2_cap.c.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-04-14 12:08:30 -03:00
Simon Filgis
cb0e8454d7
enable support for multible devices of mcp48xx
...
Instead of one static dev and priv, allocate a dedicated one each time
the init is invoked.
2024-04-14 22:10:58 +08:00
Jakub Janousek
23c6b5b07d
drivers/spi: Add support for FPGA iCE40 bitstream loading.
...
Tested on ICE-V-Wireless board.
Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>
2024-04-12 10:19:58 -03:00
jianglianfang
62a4799409
video/vnc: add vnc_fb_register
...
To optimize the initialization of vnc, change it to vnc_fb_register.
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-04-12 17:42:49 +08:00
wangjianyu3
f0590eeaf0
drivers/power/pm: Fix warning of type cast
...
Env: sim (Ubuntu 22.04.3 LTS (x86_64 GNU/Linux)), enable PM
```
power/pm/pm_autoupdate.c: In function ‘pm_auto_updatestate’:
power/pm/pm_autoupdate.c:84:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
84 | pm_auto_updatestate_cb, (FAR void *)domain, 0);
| ^
power/pm/pm_autoupdate.c:89:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
89 | pm_auto_updatestate_cb((FAR void *)domain);
| ^
```
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-04-10 22:51:28 +08:00
simbit18
9967989b02
Fix Kconfig style
...
Remove spaces from Kconfig files
Remove TABs
Add comments
2024-04-09 10:49:23 +08:00