Add basic timer operations to the kernel, including registration,
start/stop, and callback handling. This provides a consistent timer
interface for use by kernel components and drivers.
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
Introduce a single configuration option to provide strict transmit
priority ordering based on CAN ID.
The intention is to expose the user-visible behavior (strict TX
priority ordering) rather than the underlying implementation details.
Strict priority ordering is only meaningful when hardware transmit
buffer cancellation is available, so splitting this functionality into
separate configuration options was misleading and could result in
partially effective or incorrect configurations.
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
These documentation updates correspond to commits:
- drivers/capture: add signal notification support for edge capture events
- drivers/capture: add fake capture driver for testing and development
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This documentation helps users understand when and how to use IO expander
pins for implementing additional I2C buses in their applications.
Related commit: 06099d492e (drivers/i2c: Add IO expander-based I2C bit-bang)
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This moves mtd.rst from special/ directory to its own special/mtd
subdirectory and adds pages for supported devices (NOR/NAND flashes and
EEPROMS) with some basic configuration and initialization description.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This patch adds comprehensive documentation for the PTP (Precision Time
Protocol) clock driver framework in NuttX.
The documentation covers:
1. Overview and Architecture:
- IEEE 1588 PTP clock framework introduction
- Upper-half and lower-half driver architecture
- Integration with POSIX clock APIs
2. Configuration Options:
- CONFIG_PTP_CLOCK: Main framework configuration
- CONFIG_PTP_CLOCK_DUMMY: Dummy driver for testing
- CONFIG_CLOCK_ADJTIME: clock_adjtime() system call support
3. Device Interface:
- Character device interface (/dev/ptpN)
- IOCTL commands: PTP_CLOCK_GETTIME, PTP_CLOCK_SETTIME,
PTP_CLOCK_GETRES, PTP_CLOCK_ADJTIME, PTP_CLOCK_GETCAPS,
PTP_SYS_OFFSET, PTP_SYS_OFFSET_PRECISE
4. POSIX Clock API (CLOCKFD):
- Using CLOCKFD() macro to access PTP clocks
- clock_gettime(), clock_settime(), clock_getres() examples
- clock_adjtime() with various adjustment modes
- ADJ_OFFSET, ADJ_FREQUENCY, ADJ_SETOFFSET support
5. Dummy PTP Clock Driver:
- Software-based implementation for testing
- Features and initialization details
6. Example Usage:
- Basic time operations
- Frequency adjustment examples
- Time offset adjustment examples
7. Implementing Lower-Half Drivers:
- Step-by-step guide for hardware driver implementation
- Required operations and structures
- Registration process
8. Integration with PTP Daemons:
- ptp4l, timemaster, ptpd compatibility
- Standard POSIX clock API usage
9. Performance Considerations:
- Hardware timestamping requirements
- Cross-timestamping support
- Frequency adjustment resolution
10. Debugging:
- Debug configuration options
- Debug output examples
The documentation is added to:
- Documentation/components/drivers/special/ptp.rst (new file)
- Documentation/components/drivers/special/index.rst (updated)
This provides developers with complete reference material for using
and implementing PTP clock drivers in NuttX.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Add handling for GPIOC_SETDEBOUNCE to set GPIO pin debounce duration.
Add handling for GPIOC_SETMASK to enable/disable GPIO interrupt mask.
Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
In order to reduce code duplication, use the eeprom/spi_xx25xx
driver within mtd/at25ee.
The eeprom/xxx.h includes have been merged into eeprom/eeprom.h, to
provide a common include file like mtd/mtd.h.
Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
Inspired by Linux's way, we also create VLAN devices for managing VLAN,
which will become interfaces like `eth0.58`.
QinQ is also supported, we can create VLAN devices above another VLAN
devices, like `eth0.100.101` (or even `eth0.1.2.3.4`, also supported on
Linux).
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
Add support for the page erase (PE), sector erase (SE) and chip erase
(CE) dedicated commands on supported devices.
They can be triggered using the corresponding IOCTL commands
EEPIOC_PAGEERASE, EEPIOC_SECTORERASE and
EEPIOC_CHIPERASE.
On unsupported devices, this is equivalent to writing a full page,
sector, or the entire EEPROM to 0xFF.
Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
Add complete driver support for the QST QMI8658 6-axis IMU sensor featuring
3-axis accelerometer and 3-axis gyroscope with I2C interface and uORB
integration.
Key features implemented:
* Full I2C communication with configurable frequency (default 400kHz)
* Multiple accelerometer ranges (±2g, ±4g, ±8g, ±16g) and ODR settings
* Multiple gyroscope ranges (±16 to ±1024 dps) with high ODR support
* Low-pass filter configuration for both sensors
* Temperature sensing with 16-bit resolution
* Self-test capability for both accelerometer and gyroscope
* Calibration-on-demand support with offset registers
* FIFO buffer management (framework ready)
* Interrupt-driven and polling mode support
* Complete uORB integration with sensor_accel and sensor_gyro topics
Driver components added:
* Core driver implementation (qmi8658_uorb.c) with register operations
* Header file with register definitions and scale factors (qmi8658.h)
* Kconfig options for driver configuration and polling mode
* Build system integration (CMakeLists.txt, Make.defs)
* Comprehensive documentation with API reference and usage examples
The driver follows NuttX sensor framework conventions and provides
robust error handling, mutex protection, and comprehensive debugging
support through CONFIG_DEBUG_SENSORS.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Add EEPIOC_SETSPEED ioctl acting like the MTDIOC_SETSPEED ioctl. The
default frequency is settable in the Kconfig.
Add xx25xx SPI delay control configurations.
Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com>
This adds ability for read and write operations to work with messages
aligned to configured number of bytes. This has few different use
cases.
The alignment is specified as unsigned integer and can be changed with
ioctl command CANIOC_SET_MSGALIGN. The current value can be queried by
CANIOC_GET_MSGALIGN command.
The default value for the message alignment is 1. This will provide
behavior consistent with current one. Thus messages are placed to the
buffer right after data of the previous one. The same applies for
writes.
The special alignment value 0 disables read and write of multiple frames. Thus
read will always return at most one message and write will always write
only one message even if larger buffer size is provided.
Another use case is if message alignment is set to exactly message
representation size (`sizeof(struct can_msg_s)`). This allows writing
and reading arrays of messages.
Other values provide even more advanced and specialized use cases, such
as optimizations if architecture has to emulate some non-aligned
accesses, there alignment of for example 4 bytes could provide
performance boost.
The original motivation behind this is was compatibility with socket
CAN. It is easier to port applications to NuttX's CAN driver if only one
frame is provided at the time. This solution was suggested by Pavel Pisa
<pisa@fel.cvut.cz> as a more versatile variant of plain boolean
disabling the multiple frame retrieval.
Signed-off-by: Karel Kočí <kkoci@elektroline.cz>
Add documentation describing the purpose and behavior of early_syslog(),
which provides a minimal logging facility available during early system
initialization or system down.
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
Add documentation for changes made in #16809.
Add an example defconfig for a nsh build with the capture example.
Replace the STM32H7_CAP option with just CAPTURE as the guard for the
lower half driver.
Signed-off-by: Côme VINCENT <44554692+comejv@users.noreply.github.com>
The GNSS lower-half driver for facilitating the implementation of uORB
GPS/GNSS device drivers was lacking documentation. Contributors cannot
be expected to implement their drivers correctly with this framework if
it is undocumented. This change adds documentation for how to use the
lower-half GNSS driver, provides an example and also adds a notice for
users to use this framework if implementing their own GNSS driver.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit creates a sbutton device that uses a single button to
create a keyboard driver that returns TAB or ENTER depending how
long the user keeps the button pressed.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
Updates the ADS1115 documentation with information about the two new
commands for triggering conversion and reading the result.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit removes the termios dependency of the command to set fix
rate. It makes the MINMEA dependency present in the Kconfig options for
the driver, and it also adds a retry limit to the boot message
verification of 3 times. The documentation has been updated to reflect
the correct signature for the registration function and fix some
formatting.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit adds the lowerhalf driver support for the I2C Slave.
While not currently ideal, it is compatible with the upperhalf i2c slave driver.
A workqueue can be used to delegate the isr work to the upperhalf driver.
But keep in mind wq introduces a lot of delay and in certain scenarios,
it is better to write your own better upperhalf driver.
Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
Introduces two documentation additions. First, the RFC 5424 support is
documented on the main syslog documentation page, with information about
how to use it effectively. Second is the application documentation for
the `syslogd` application addition, which enables easy use of the new
RFC 5424 support.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit adds the missing documentation for the ioctl command ANIOC_ADS1115_READ_CHANNEL.
Signed-off-by: Tony Lin <99093620+justapotato213@users.noreply.github.com>
The MCP47X6 series consists of the following single channel DAC chips:
- MCP4706 (8 bit)
- MCP4716 (10 bit)
- MCP4726 (12 bit)
The driver supports the following configurations:
- gain
- power down
- voltage reference
Persistent configuration storage in the internal EEPROM is not
implemented.
This patch adds support for the NAU7802 24 bit ADC from Nuvoton.
Please read the documentation for more details.
Signed-off-by: Daniel Byshkin <online@bskdany.com>
This commit adds the documentation for the Texas Instruments ADS1115 Driver.
Signed-off-by: Tony Lin <99093620+justapotato213@users.noreply.github.com>
Adds initial documentation to the IOCTL commands of wireless character devices.
Signed-off-by: Kevin Witteveen (MartiniMarter) <kevinwit1999@gmail.com>
Added detailed information about the SX126x and its current state in development.
Added directories for wireless character driver and LPWAN.
Added indexes to each directory and its contents within.
Signed-off-by: Kevin Witteveen (MartiniMarter) <kevinwit1999@gmail.com>
This ioctl clears the active fault inputs. Some faults can be latched
(still active even if the source is not active anymore), so they have
to be cleared from the software. The argument is a pointer to unsigned
long bitmask variable. This bitmask specifies which faults are to be
cleared.
The ioctl also can fetch the faults active prior to the clear. These
faults are saved to the argument specifying which faults are to be
cleared. Therefore passing zero bitmask means the driver will only return
active faults and clear none. Passing NULL pointer means the driver
will clear all active and return none.
The implementation of this ioctl is per driver.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>