Commit Graph

4095 Commits

Author SHA1 Message Date
Xiang Xiao 4d66266a8e sched: Don't include nuttx/sched.h inside sched.h
But let nuttx/sched.h include sched.h instead to
avoid expose nuttx kernel API to userspace.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I6fe673364be9eb1259381e6575d4c1a9fea58097
2021-06-13 00:25:26 -07:00
Xiang Xiao e4143c66d9 serial/pty: Initialize the terminal setting as a console
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie80a22b7a074d048435524d86f0ca7fc7a20e756
2021-06-11 06:28:55 -07:00
Xiang Xiao ae28e03f1f serial/pty: Don't return -NOSYS if pollfd::events equals 0
since the caller is free not to monitor any event

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib957be1b1b5a686faea0196bc9069e0908a492eb
2021-06-11 05:05:27 -07:00
Jiuzhu Dong f0ba04eb2b syslog/ramlog: write zero for the overwrite area
N/A

Change-Id: I8f8d8c53e77ee9d916cb97ea7cd3e988fbbe9ad2
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
(cherry picked from commit 4d8124a28048ea7ba7717d999553028e5384d631)
2021-06-07 10:09:52 +08:00
Jiuzhu Dong 47f09e2a18 syslog/intbuf: output log when syslog interrupt buffer is full
N/A
instead of adding overrun memssage:"[truncated]\n" to the end.

Change-Id: Ie27cdf0ca902d9ba203619a95162f01222e371c5
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-04 13:46:45 +08:00
Xiang Xiao 3c33d253b4 drivers/syslog: Remove emergstream implementation and caller
since emergstream always call syslog_force, but syslog_force is designed
for the interrupt context, and then doesn't mean any emergency thing.
On the other hand, emergstream has other bad side effect:
1.Can't output to file or dev channel
2.Can't work well with the interrupt buffer

Change-Id: I1c7af74f82da93ffa4ebe0e6ac25634aeb73a890
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-04 13:46:41 +08:00
chao.an e223790148 serial/uart/h4: add bt h4 uart serial driver
Change-Id: I456622ce097006447cc8b050e4a44ee96865ddfe
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 18:33:20 +08:00
chao.an 8f0cc709d4 wireless/bluetooth: decoupling bt_driver_s and bt_buf_s
Change-Id: I12879c364cf8ca63898da94621e94d8fc23a4f6f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 18:33:14 +08:00
chao.an df71da9450 bluetooth/filter: add more OGF into ble blacklist
Change-Id: I4f1b98dc63ab2d9eeb523b8040aae88ea285bb9a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-31 21:00:01 +08:00
chao.an 438774a560 bluetooth: fix exclusive deadlock on high priority thread
Change-Id: I0653374507b4372dce1ec1274b38da72f3ac6f03
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-31 21:00:01 +08:00
Jiuzhu Dong 78f4220106 syslog: set default value for SYSLOG_DEFAULT based on the usage of other syslog channels.
N/A

Change-Id: I702a7e3d4fee2f17419a8b7e184b2646b871b64a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-25 15:22:10 +08:00
Jiuzhu Dong 418923540d syslog/ramlog: initialize g_sysdev based on the current ramlog buffer
N/A
by ramlog_initbuf();
Algorithm: Scan the entire ramlog buffer, the position of the head
is the first byte is not empty and second byte is empty. The position
of the tail is the first byte is empty and second byte is not empty.

Change-Id: Ieb9161bd670481cd335e9a901287cd5e589f0849
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 22:28:11 +08:00
Jiuzhu Dong e318b040f8 syslog/syslog_channel: fix compile warning
N/A

syslog/syslog_channel.c: In function ‘syslog_default_putc’:
syslog/syslog_channel.c:139:10: warning: implicit declaration of function ‘up_putc’ [-Wimplicit-function-declaration]
  139 |   return up_putc(ch);
      |          ^~~~~~~

Change-Id: I30f607c000fefc6a1189397e6ae2320c562a67ec
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 22:04:25 +08:00
Jiuzhu Dong bd10e5716d syslog/ramlog: save ramlog to fixed section
N/A

we can reload ramlog after hot reboot.

Change-Id: Iee7c105a2358075302121d6bf0047bc54d07e9a6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 20:06:38 +08:00
Jiuzhu Dong d2e9d1bf02 syslog: fix bug for support multi syslog channel
N/A

Change-Id: I6d8b5bce8071f11b1903fe1fa0fe8dbc34bf3a09
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 20:03:37 +08:00
Jiuzhu Dong 36a0dae82a syslog: support ramlog, up_putc, rpmsg_syslog coexist
N/A

Change-Id: Ia58c7e195da7ad48f3018a131a78b2f01f94e741
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-20 11:04:39 +08:00
Xiang Xiao 874e564c89 drivers/serial: Change the default value of SERIAL_NPOLLWAITERS to 4
since the console is normally opened three time as stdin, stdout and
stderr and remove the dependence on STANDARD_SERIAL because other type
of serial drivers also support the poll through the same codebase.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie68322c4647cc838b295491329969869d6ba310b
2021-05-17 19:55:40 +08:00
Jiuzhu Dong 639c2c5cb2 syslog/Kconfig: support config multi syslog channel
N/A

delete choice for select syslog log device

Change-Id: Ifc02e687526506afac46febec375062949869356
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
(cherry picked from commit 795f2d56dad1f30fd23ae1868226ee8379fd4f93)
2021-05-12 13:08:40 +08:00
Jiuzhu Dong 9a956df67b sim_addrenv: support add addrenv dynamically multiple times.
N/A

Change-Id: Ie34f6c59bc16fb147c7103978253dbe9403990d3
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-08 20:26:39 +08:00
Jiuzhu Dong 788e409cb7 driver/syslog: add config SYSLOG_RPMSG_SERVER_NAME to
N/A

specified the name of remote proc(rpmsg server)

Change-Id: Ie270d651071e87a40a80ab489597ae18db9814f0
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-08 20:22:28 +08:00
Jiuzhu Dong a099f22123 driver/rtc: add config CONFIG_RTC_RPMSG_SERVER to
N/A
select rtc rpmsg role.

Change-Id: I7f9053b070593573caa5d988c6a2e13593da6bc5
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-08 20:19:07 +08:00
Jiuzhu Dong 436180b6ad driver/rtc: add config RTC_RPMSG_SERVER_NAME to
N/A

specified the name of remote proc(rpmsg server)

Change-Id: I0086bb43727a2bbb5e68f88907b5e4608182ef9c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-08 20:16:09 +08:00
chao.an dcc2db8d40 make/archive: replace the dependency to preprequisite list
Change-Id: Id63f3cd32906461a54cb016ef8078d4d922845e2
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-07 21:34:45 +08:00
liuhaitao dc639b2b59 Merge remote-tracking branch 'mirtos/master' into dev-upmerge-nuttx-10.1-0507
Change-Id: I4bb3a61356be2b4a77ccfe45390b15e68a376dd6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-05-07 20:46:07 +08:00
liuhaitao e3166ecac0 Revert "make/archive: replace the dependency to preprequisite list"
This reverts commit 9c946e2af6.

Change-Id: Ia8b7726d036c861d5eda51765d330e894e0d214a
2021-05-07 16:38:39 +08:00
ligd 4a219c2889 serial: add ctrl+@ to force crash system for debugging
Change-Id: Iee65ac6c94ff298cfadf4429936b3744c16b8698
Signed-off-by: ligd <liguiding1@xiaomi.com>
(cherry picked from commit 659679bbb0d7b405e19eb00b13c5b8b388eaf68d)
2021-05-06 22:05:07 +08:00
Jiuzhu Dong 6b78e90fc1 syslog/ramlog: get ramlog size by ioctl
N/A

Change-Id: I092334f3247c6c13f3be35169f192bd0777435ef
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-04-25 14:22:05 +08:00
Masayuki Ishikawa 97e6d35c3a drivers: wireless: Fix AT command response handling in gs2200m.c
Summary:
- When sending an AT command during receiving a bulk packet,
  the bulk packet might be put in the AT command response.
- To handle such the case, gs2200m_send_cmd2() is newly
  introduced instead of using gs2200m_send_cmd(dev, cmd, NULL)

Impact:
- All use cases that send an AT command in gs2200m.c

Testing:
- Tested with renew and nxplayer with spresense:wifi

Reported-by: Masatoshi Ueno <Masatoshi.Ueno@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-04-15 21:28:25 -05:00
Marco Krahl 05b889457e 1wire: Removes duplicate device information
Removes the family identifier from the device configuration, since the device
family is already part of the rom code and the underlying logic does know how
to extract this information.

include/nuttx/1wire drivers/sensors

stm32f103-minimim

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-15 02:28:42 -05:00
Marco Krahl 9f9d266f68 drivers/sensors: Adds new driver for ds18b20 sensore module
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-14 02:49:28 -05:00
Marco Krahl 624a60f456 drivers/1wire: Adds some improvents
The following changes where added.
- Removes dependency to slave structure. Selecting a device on the bus only
  requires the unique romcode.

- Make search operation mutual exclusive on the bus. This is necessary to
  prevent another driver instance from making a transition on the bus at
  the same time.

- Skip also rom when only 1 slave is expected on the bus. Physical
  connected devuce should be indicated by the maxslave paramter during
  initializing, not the reigstered slaves.

- Fixes some compiler warnings in existing ds28e17 driver.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-14 02:49:28 -05:00
Marco Krahl 8456f3615e drivers/1wire: Moves header and adjusts include paths
Moves header to 1wire include sub directory.
Moves over common crc definitions to new interface.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-14 02:49:28 -05:00
Marco Krahl c726dac605 nuttx/1wire: Adds 1wire master interface
This implements a new master interface to handle the 1-wire transition in an
atomic sense.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-14 02:49:28 -05:00
Anthony Merlino 9c8c2b0db2 Separate CLOCK_TIMEKEEPING and SCHED_TICKLESS. 2021-04-13 11:42:31 -05:00
Masayuki Ishikawa fa5daea3d9 drivers: wireless: Fix to receive a UDP packet partially in gs2200m.c
Summary:
- When receiving a UDP packet partially, the rest of the packet
  must be discarded.

Impact:
- None

Testing:
- Tested with a UDP sample program

Reported-by: Masatoshi Ueno <Masatoshi.Ueno@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-04-13 10:37:15 -05:00
Xiang Xiao 3f9908f7d1 Remove the unnecessary math.h inclusion
or move from header file to source file since math.h doesn't always exist

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-12 22:58:23 -04:00
jturnsek f57ff30545 Removing FLexSPI NOR driver 2021-04-12 17:22:14 -03:00
jturnsek 7453e76d98 FlexSPI NOR driver 2021-04-12 11:35:44 -03:00
Fotis Panagiotopoulos 3543ac95bf syslog_device: Device is re-opened in case of failure. 2021-04-10 06:47:44 -05:00
Alin Jerpelea 231b8518b7 NuttX: Ken Pettit: update licenses to Apache
Ken Pettit has submitted the ICLA and we can migrate the licenses
 to Apache.

Sebastien Lorquet has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-10 06:42:19 -05:00
Michal Lenc 3f43a34d11 drivers/lcd/ili9225: fix nxstyle
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-04-09 22:41:56 -03:00
Michal Lenc cf7cfa682b drivers: added support for ili9225 controller
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-04-09 22:41:56 -03:00
Fotis Panagiotopoulos ee7276e7a7 syslog: syslog_device ops are handled internally by the driver. 2021-04-09 08:02:38 -05:00
Jiuzhu Dong d3843bf334 lirc: fix bug about lirc_raw_event
N/A

Change-Id: If00d0a7e4e4f9a0d9119b6a170cffd993f23f71a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-04-09 12:28:54 +08:00
Gustavo Henrique Nihei ada84cacda drivers/input: Rename AJOYSTICK configs to INPUT_AJOYSTICK 2021-04-08 14:41:22 -03:00
Gustavo Henrique Nihei 3054237d2e drivers/input: Rename DJOYSTICK configs to INPUT_DJOYSTICK 2021-04-08 14:41:22 -03:00
Gustavo Henrique Nihei 2efae6928d drivers/input: Rename BUTTONS configs to INPUT_BUTTONS 2021-04-08 14:41:22 -03:00
Gustavo Henrique Nihei 5719dab8ec drivers/input: Rename MOUSE configs to INPUT_MOUSE 2021-04-08 14:41:22 -03:00
Gustavo Henrique Nihei 00e68bb38d drivers/input: Add TOUCHSCREEN config for touchscreen input devices 2021-04-08 09:17:58 -07:00
Marco Krahl 7e8424903a drivers/sensors: Adds driver for hyt271 sensore module
This adds a sensor driver for the hyt271, hyt221, and hyt939 sensor module from
vendor iST (Innovative Sensor Technology). This sensor type is connected via i2c
bus and allows the measurement of relative humidity and temperature.

Each driver instance supports two different character device for each type
(/dev/sensor/tempX and /dev/sensor/humiX).

This driver also supports changing the i2c address of one connected sensor on
the bus. This requires a callback to the platform-specific board logic which
must ensure a power-on reset.

Optional the driver allows setting up a read interval for fetching sensor data.
This is done by a worker thread and can be useful when watching several sensors
via poll() by the userspace application.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-07 21:29:51 -05:00