Skip to content

Commit 4c5aa04

Browse files
authored
Merge branch 'apache:master' into boards/esp32/heltec_leds
2 parents c87518a + b82b5d0 commit 4c5aa04

3,295 files changed

Lines changed: 17547 additions & 53777 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespell-ignore-lines

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,4 @@ libs/libc/tre-mem.c
178178
#define RTPROT_RA 9 /* RDISC/ND router advertisements */
179179
/* Followed by one or more ND options */
180180
* message using the Neighbor Discovery (ND) protocol. It then listens
181+
PIO DUE SCHEM. PIN MAPPING SAM3X DUE SCHEM. BOARD LABEL

Documentation/applications/examples/lvglterm/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ LVGL application that executes NuttShell (NSH) commands entered with a
66
Touchscreen Keyboard and displays the NSH output. Prerequisite configuration
77
settings:
88

9-
- ``CONFIG_NSH_ARCHINIT=n`` – NSH architecture initialization must be disabled.
109
- ``CONFIG_NSH_CONSOLE=y`` – NSH must be configured to use a console.
1110
- ``CONFIG_LIBC_EXECFUNCS=y`` – posix_spawn() must be enabled.
1211
- ``CONFIG_PIPES=y`` – Pipes must be enabled.

Documentation/applications/nsh/config.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,6 @@ Configuration Description
374374
``CONFIG_NSH_TELNET`` If ``CONFIG_NSH_TELNET`` is set to *y*, then a TELNET server
375375
front-end is selected. When this option is provided, you may log
376376
into NuttX remotely using telnet in order to access NSH.
377-
378-
``CONFIG_NSH_ARCHINIT`` Set ``CONFIG_NSH_ARCHINIT`` if your board provides architecture
379-
specific initialization via the board-specific function
380-
``board_app_initialize()``. This function will be called early in
381-
NSH initialization to allow board logic to do such things as
382-
configure MMC/SD slots.
383377
=================================== ==================================
384378

385379
.. _nsh_vars_table:

Documentation/applications/nsh/customizing.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@ The NSH initialization function, ``nsh_initialize()``, be found in
108108
``apps/nshlib/rc.sysinit.template``. The resulting ROMFS file system can be
109109
found in ``apps/nshlib/nsh_romfsimg.h``.
110110

111-
#. ``board_app_initialize()``: Next any architecture-specific NSH
112-
initialization will be performed (if any). For the STM3240G-EVAL,
113-
this architecture specific initialization can be found at
114-
``boards/arm/stm32/stm3240g-eval/src/stm32_appinit.c``. This it does
115-
things like: (1) Initialize SPI devices, (2) Initialize SDIO, and (3)
116-
mount any SD cards that may be inserted.
117-
118111
#. ``nsh_netinit()``: The ``nsh_netinit()`` function can be found in
119112
``apps/nshlib/nsh_netinit.c``.
120113

Documentation/applications/nsh/installation.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ Customizing NSH Initialization
66
customize the NSH start-up behavior. Here they are presented in order of
77
increasing difficulty:
88

9-
#. You can extend the initialization logic in
10-
``boards/arm/stm32/stm3240g-eval/src/stm32_appinit.c``. The logic
11-
there is called each time that NSH is started and is good place in
12-
particular for any device-related initialization.
13-
149
#. You replace the sample code at ``apps/examples/nsh/nsh_main.c`` with
1510
whatever start-up logic that you want. NSH is a library at
1611
``apps/nshlib``. ``apps.examples/nsh`` is just a tiny, example
Lines changed: 111 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,111 @@
1-
============================================
2-
``nxcamera`` NxCamera video test application
3-
============================================
1+
=============================================
2+
``nxcamera`` Camera/Video Stream Test Command
3+
=============================================
4+
5+
Introduction
6+
============
7+
8+
``nxcamera`` is a command-line utility for testing camera devices and video
9+
stream capture in NuttX. It is built on top of the NuttX video subsystem
10+
(using a V4L2-style interface) and is typically used to:
11+
12+
- Enumerate and open video device nodes such as ``/dev/video0`` and
13+
``/dev/video1``
14+
- Configure capture parameters including resolution and pixel format
15+
- Capture video frames for validation, debugging, or simple data dumping,
16+
depending on platform support and build configuration
17+
18+
Usage
19+
=====
20+
21+
``nxcamera`` is an interactive command-line program. Start it from NSH, then
22+
enter commands at the ``nxcamera>`` prompt:
23+
24+
.. code-block:: console
25+
26+
nsh> nxcamera
27+
nxcamera>
28+
29+
Tip: Execute NSH Commands (Hidden)
30+
==================================
31+
32+
At the ``nxcamera>`` prompt you can run an NSH command by prefixing it with
33+
``!``. This is useful for quickly checking system state or invoking other
34+
utilities without exiting ``nxcamera``.
35+
36+
.. code-block:: console
37+
38+
nxcamera> !ls /dev
39+
/dev:
40+
console
41+
fb0
42+
gpio0
43+
gpio1
44+
gpio2
45+
gpio3
46+
loop
47+
null
48+
oneshot
49+
ram0
50+
ram1
51+
ram2
52+
video0
53+
video1
54+
zero
55+
nxcamera> !poweroff
56+
bash>
57+
58+
A typical workflow at the prompt is:
59+
60+
- ``input /dev/video0`` to set the input video node.
61+
- ``output /dev/fb0`` to set the output node, for example a framebuffer.
62+
- ``stream 640 480 30 NV12`` to start streaming with ``width height fps
63+
format``.
64+
- ``stop`` to stop streaming.
65+
66+
You may just copy-paste the commands below to get started:
67+
68+
.. code-block:: console
69+
70+
nxcamera
71+
input /dev/video0
72+
output /dev/fb0
73+
stream 640 480 30 YUYV # or NV12 on macOS
74+
75+
Pixel Format
76+
============
77+
78+
For the ``stream`` command, the pixel format depends on the platform. On the
79+
macOS ``sim`` platform you may use ``NV12``, while on Linux systems ``YUYV``
80+
is more commonly used.
81+
82+
Examples
83+
========
84+
85+
1. Start ``nxcamera`` and configure a typical interactive capture session:
86+
87+
.. code-block:: console
88+
89+
nsh> nxcamera
90+
nxcamera> input /dev/video0
91+
nxcamera> output /dev/fb0
92+
nxcamera> stream 640 480 30 NV12
93+
nxcamera> stop
94+
95+
.. figure:: nxcamera_macos_sim.png
96+
:alt: nxcamera running on the macOS SIM platform
97+
:align: center
98+
99+
``nxcamera`` using the macOS AVFoundation backend on the SIM platform.
100+
101+
Features and Updates
102+
====================
103+
104+
- Multiple camera instances are supported, allowing several cameras to be
105+
exposed as different device nodes such as ``/dev/video0`` and
106+
``/dev/video1``. This makes it easier to select and validate different
107+
video input sources on the same system.
108+
- On the ``sim`` platform, support has been added for the macOS
109+
AVFoundation backend. This enables camera capture and functional
110+
verification on macOS hosts, subject to build configuration and host
111+
permission settings.
428 KB
Loading

Documentation/components/drivers/character/quadrature.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
Quadrature Encoder Drivers
33
==========================
44

5+
A Quadrature Encoder (QE) is a kind of sensor normally used to read
6+
angular rotation of a motor or other turning device.
7+
8+
NuttX supports internal QE peripheral that exists in some microcontrollers
9+
like ESP32, iMXRT, STM32, nRF5x, TIVA, and others, and also supports
10+
Magnetic Rotary Encoders like AS5048, MT6816, etc.
11+
12+
Internal Peripheral Quadrature Encoder
13+
======================================
14+
515
NuttX supports a low-level, two-part Quadrature Encoder driver.
616

717
#. An "upper half", generic driver that provides the common
@@ -28,6 +38,46 @@ following locations:
2838
for the specific processor ``<architecture>`` and for the
2939
specific ``<chip>`` Quadrature Encoder peripheral devices.
3040

41+
Magnetic Rotary Encoder
42+
=======================
43+
44+
Although technically a Magnetic Rotary Encoder is not a Quadrature Encoder,
45+
usually uses the QE Lower Half driver to export a device compatible with
46+
quadrature encoder. This way an application using an ordinary QE encoder
47+
could use a Magnetic Rotary Encoder with any modification, just need to
48+
enable and initialize the Magnetic Rotary Encoder on their board.
49+
50+
This is how a board powered by STM32 will initialize a MT6816 Magnetic
51+
Rotary Encoder:
52+
53+
.. code-block:: c
54+
55+
/* Initialize the SPI bus connected to MT6816 */
56+
57+
spi = stm32_spibus_initialize(spi_busno);
58+
if (spi == NULL)
59+
{
60+
return -ENODEV;
61+
}
62+
63+
/* Initialize MT6816 using `spi` and a `device number` starting from 0 */
64+
65+
dev = mt6816_initialize(spi, (uint16_t) devno);
66+
if (dev == NULL)
67+
{
68+
return -ENODEV;
69+
}
70+
71+
/* Use the returned qe lower half to register /dev/qe# (# => devno) */
72+
73+
ret = qe_register(qe_path, dev);
74+
if (ret < 0)
75+
{
76+
snerr("ERROR: Failed to register MT6816 qe%d driver: %d\n",
77+
devno, ret);
78+
ret = -ENODEV;
79+
}
80+
3181
Application Programming Interface
3282
=================================
3383

Documentation/components/drivers/character/timers/timer.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,7 @@ To enable this feature, set the following configuration options:
498498
CONFIG_TIMER=y
499499
CONFIG_TIMER_WDOG=y
500500
501-
Then call ``timer_wdog_initialize()`` from your board initialization code
502-
(typically in ``board_late_initialize()`` or ``board_app_initialize()``):
501+
Then call ``timer_wdog_initialize()`` from your board initialization code.
503502

504503
.. code-block:: c
505504

Documentation/components/drivers/special/usbhost.rst

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ USB Host-Side Drivers
88
``struct usbhost_connection_s`` defined in
99
``include/nuttx/usb/usbhost.h``.
1010

11-
- ``struct usbhost_driver_s`` provides the interface between
11+
- ``struct usbhost_driver_s`` provides the interface between
1212
the USB host driver and the USB host class driver.
1313

1414
- ``struct usbhost_connection_s`` provides the interface between
@@ -91,9 +91,6 @@ USB Host-Side Drivers
9191
registered USB host class driver to the USB host controller
9292
driver.
9393

94-
**Examples**: The function ``nsh_waiter()`` in the file
95-
``boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c``.
96-
9794
#. As part of its operation during the binding operation, the
9895
USB host class driver will register an instances of a
9996
standard NuttX driver under the ``/dev`` directory. To
@@ -106,3 +103,37 @@ USB Host-Side Drivers
106103
**Examples**: See the call to ``register_blockdriver()`` in
107104
the function ``usbhost_initvolume()`` in the file
108105
``drivers/usbhost/usbhost_storage.c``.
106+
107+
CDC-ECM Host Class Driver
108+
=========================
109+
110+
The CDC-ECM (Ethernet Control Model) host class driver
111+
(``drivers/usbhost/usbhost_cdcecm.c``) supports USB devices that expose
112+
a network interface using the USB Communications Device Class Ethernet
113+
Control Model. Common device types include:
114+
115+
- **USB-to-Ethernet adapters** that implement CDC-ECM, providing wired
116+
Ethernet connectivity over a USB port.
117+
118+
- **Cellular modems and similar devices** that expose a CDC-ECM
119+
interface for IP connectivity, such as LTE modems operating in USB
120+
tethering mode.
121+
122+
When a compatible device is connected and enumerated, the driver
123+
registers a standard NuttX Ethernet network interface — for example
124+
``eth0`` — and integrates with the NuttX networking stack in exactly the
125+
same way as any on-board Ethernet driver. Normal network configuration
126+
can then be applied to the interface using standard NSH commands::
127+
128+
ifup eth0
129+
ifconfig eth0 192.168.1.10 netmask 255.255.255.0
130+
131+
Or with DHCP via the ``netinit`` daemon when
132+
``CONFIG_NETINIT_DHCPC=y`` is selected.
133+
134+
The driver is registered by calling ``usbhost_cdcecm_initialize()``
135+
during board initialization, before the USB host waiter thread begins
136+
enumerating devices.
137+
138+
**Examples**: ``drivers/usbhost/usbhost_cdcecm.c``,
139+
``boards/arm/stm32h5/nucleo-h563zi/configs/nshusbnet/defconfig``.

0 commit comments

Comments
 (0)