Commit Graph

5660 Commits

Author SHA1 Message Date
Jiuzhu Dong
8f39c5f11b driver/sensor: simplify buffer operation
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>
2022-07-26 10:40:21 +08:00
Jiuzhu Dong
dad5ab75ff driver/sensor: support userspace wirte data into sensor device
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-26 10:40:21 +08:00
Jiuzhu Dong
fc84813b0a driver/sensor: add calibrate interface for sensor driver.
Add standard sensor interface for calibrate, can trigger
calibration and obtain calibration value.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-25 17:44:31 +08:00
zhanghongyu
7467586d55 netdev: add return value for ifup / ifdown
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-07-25 15:29:24 +08:00
Jiuzhu Dong
6e1244c274 mm/circbuf: add circ_peekat to read data with specified postion
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-25 13:35:26 +08:00
Jiuzhu Dong
a853c70093 mm/circbuf: add circbuf_is_init to indicate circbuf state
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-25 13:35:26 +08:00
Jiuzhu Dong
3132f169ef driver/sensor: add sensor type of cap and wake_gesture
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-25 13:34:58 +08:00
curuvar
c21c7ac8dc Added Adafruit QT Py RP2040 board.
Added ability to configure indivdual UART, SPI and I2C pin location.
2022-07-23 18:25:38 +08:00
Masayuki Ishikawa
0cef7b765e binfmt: Fix memory leak in ELF loader
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>
2022-07-23 14:34:27 +08:00
Karel Kočí
6c7f99189b libs/libc/string: add memmem
This function is the GNU extension.
2022-07-22 19:04:11 +03:00
Xiang Xiao
344a9bc838 fs/hostfs: Change nuttx_dev_t from uint16_t to uint32_t
Follow up the following change:
commit 008cb0d31a
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date:   Thu Jul 14 02:27:34 2022 +0000

    sys/sysmacros.h: support sysmacros header

    Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-22 17:08:50 +03:00
Jiuzhu Dong
978530f5f6 fs/ioctl: add BLKSSZGET cmd to get block sector size
refer to:
https://sites.uclouvain.be/SystInfo/usr/include/sys/mount.h.html

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 09:07:57 +03:00
Jiuzhu Dong
008cb0d31a sys/sysmacros.h: support sysmacros header
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 11:10:08 +08:00
Karel Kočí
fb0fdea4d4 include/nuttx/lcd: change meaning of buffer argument for putarea
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.
2022-07-22 11:08:00 +08:00
Fotis Panagiotopoulos
66f49c1f3c mm: Fixed the usage of CONFIG_MM_BACKTRACE & CONFIG_DEBUG_MM. 2022-07-22 00:53:02 +08:00
Jiuzhu Dong
e7b8af7a35 driver/ramlog: set CONFIG_SYSLOG_DEVPATH to /dev/kmsg when enbale ramglog
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
anjiahao
2b65b46946 boardctl:add reset subreason restore factory
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 20:48:56 +08:00
anjiahao
0b3fd3b0b5 serial:fix a compile bug
serial_io.c use pid,but the headfile Inconsistent macro definitions
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 10:01:44 +03:00
Masayuki Ishikawa
aecdcb316b Revert "binfmt: Fix memory leak in ELF loader"
This reverts commit 23d57be21b.
2022-07-20 15:34:58 +03:00
Jiuzhu Dong
43f0555bfb include/sensors/ioctl: remove duplication ioctl cmd
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-20 14:56:46 +03:00
Masayuki Ishikawa
23d57be21b binfmt: Fix memory leak in ELF loader
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>
2022-07-20 14:56:37 +03:00
Alan Carvalho de Assis
b3daaf765b drivers/lcd: Add support to use APA102 LED Matrix as LCD Display
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-07-19 18:50:04 +03:00
Xiang Xiao
463f321316 wireless/ieee802154: Don't set IFF_DOWN in mac802154netdev_register
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>
2022-07-19 11:09:16 +03:00
Xiang Xiao
2166c98809 Add printflike and scanflike to all printf/scanf like functions
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:14:36 +03:00
Xiang Xiao
aad5fbd2fb arch: Add up_nputs function to handle the non '\0' string correctly
and change up_puts as a simple macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-17 17:31:19 +03:00
curuvar
d69d9eb0c9 Added I2C Slave to RP2040
Added length to I2C slave callback.
2022-07-16 01:56:52 +08:00
Masayuki Ishikawa
d96c87f666 syscall: Add socketpair to syscall.csv
Summary:
- This commit adds socketpair to syscall.csv

Impact:
- None

Testing:
- Tested with adb (not merged net)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-15 13:31:58 +08:00
xiangdong6
8dbceb77f7 include: Declare nxtask_delete function.
Add nxtask_delete declaration in order to prevent build warnings.

Signed-off-by: xiangdong6 <xiangdong6@xiaomi.com>
2022-07-14 10:44:26 +03:00
Huang Qi
e23bcb0e81 vncserver: Correct rfb_keyevent_s definition
Refer to https://datatracker.ietf.org/doc/html/rfc6143,
size of key is 4 byte.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-07-11 14:11:43 +08:00
Nathan Hartman
849f760b77 Fix various typos 2022-07-08 02:15:54 +08:00
Adam Kaliszan
664d45dcba New rules of triggering redrawing display.
New callback redraw in lcd_framebuffer.c
SSD1680 driver (e-ink display) changes.
2022-07-05 23:05:32 +08:00
Xiang Xiao
fcc48c2254 arch/arm: Don't include arch/arch.h in include/irq.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-04 13:25:56 +03:00
zhanghongyu
c7c5c75451 net_if: add IFF_LOOPBACK/POINTOPOINT/MULTICAST/BROADCAST
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-07-03 09:57:10 -04:00
chao.an
58dcee641e net/netdev: move netdev_ifup/down to public header
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-07-03 02:28:50 +08:00
curuvar
0c3db448bb Added Adafruit Feather RP2040, Adafruit KB2040 and Added neopixel driver to support RP2040 2022-06-30 22:13:49 -07:00
Nimish Telang
903a186304 Use builtins for byteswapping
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.
2022-06-29 11:32:59 +08:00
zouboan
b41929522c drivers/timers/capture.c: add support of pwm capture driver 2022-06-28 10:35:43 +08:00
Nathan Hartman
6057960331 Fix mistakes in comments and docs
* drivers/wireless/bluetooth/bt_null.c: Fix misleading comment

* drivers/wireless/spirit/Kconfig: Fix incorrect word (absolution).

* drivers/wireless/spirit/drivers/Kconfig: Fix wrong name (TMicro->STMicro)

* drivers/wireless/spirit/drivers/spirit_netdev.c: Fix wrong word
  (verify->very).

* drivers/wireless/spirit/drivers/spirit_netdev.c: Fix double "the" and typo.

* include/nuttx/net/radiodev.h: Fix various typos and errors.
2022-06-27 11:30:53 +08:00
chao.an
b476c68ac3 wireless: add SIOCGIWCOUNTRY (Get country code)
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-23 21:48:08 +08:00
Michael Jung
9140693567 Add lcd_dev_s pointer to lcd_planeinfo_s
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>
2022-06-21 21:33:23 +08:00
Richard Tucker
88c58df6d6 net: fix DP83825I comments 2022-06-21 12:06:37 +03:00
Richard Tucker
eaa5f9ab4e net: add DP83848C constants 2022-06-21 12:06:37 +03:00
Ville Juven
ba4277bb13 syscall: Remove exit() call gate
exit() is a userspace function, no need for call gate
2022-06-20 14:14:28 +03:00
chao.an
fbddae8813 wireless/bcm43xxx: add customized MAC address support
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-19 10:13:23 +08:00
Xiang Xiao
22548d71eb drivers/syslog: reuse rmutex_t for the recursive check
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-16 19:01:49 +03:00
Xiang Xiao
7a739851aa include/cxx: Remove all non standard c++ header files
All standard header files can check here:
https://en.cppreference.com/w/cpp/header

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-16 15:42:45 +03:00
Petro Karashchenko
b343a42e8c nuttx/lib: remove dependency on BUILD_FLAT for library memory allocation interface
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-06-15 16:58:34 -03:00
Juha Niskanen
449cf4d076 getrandom: fix comment contradicting code
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2022-06-15 11:18:04 -03:00
zouboan
cb8c992914 drivers/sensors: add driver for as5048a magnetic encoder 2022-06-13 12:21:35 +03:00
Xiang Xiao
53c6789bef mm: Add mm_uninitialize to release the resource
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-12 19:41:14 +09:00