nuttx/Documentation
Karel Kočí c61d7c7e8d nuttx/can: add message alignment
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>
2025-11-24 14:11:41 +08:00
..
_extensions Documentation: port warnings_filter Sphinx extension from Zephyr 2023-11-28 09:18:29 -08:00
_static docs: reduce main content max width from 1200px to 1000px 2021-03-26 23:41:45 -05:00
_templates Documentation: support versioned docs 2020-11-26 10:58:44 -08:00
applications Documentation: Add documentation for NSH_BUILTIN_AS_COMMAND 2025-11-15 10:49:58 -05:00
components nuttx/can: add message alignment 2025-11-24 14:11:41 +08:00
contributing docs/codeowners: Provide some relevant information about CODEOWNERS. 2025-09-06 10:12:16 +08:00
debugging sched: Improve nxsched stack overflow checking implementation 2025-10-11 18:00:44 +08:00
faq DOC: Add how to get application on NSH 2024-06-06 02:39:56 +08:00
guides nuttx/can: add message alignment 2025-11-24 14:11:41 +08:00
implementation Documentation/Make: add implementation/make_build_system.rst 2025-11-20 09:39:16 -05:00
introduction WIP: Documentation: replace first person perspectives 2025-05-19 20:21:33 +08:00
logos style: fix typos 2025-04-30 13:45:46 +08:00
platforms Documentation: Add GPT information to RA4M1 documentation 2025-11-17 09:01:31 -03:00
quickstart Doc: Remove MOTD string from nsh shell on simulator 2025-07-30 12:01:56 +08:00
reference 11_network.rst: Add a "Network Interfaces Overview" section and 2025-11-13 11:29:38 -03:00
ReleaseNotes Documentation: add NuttX-12.11.0 release notes 2025-09-28 20:52:20 +08:00
standards Documentation/posix.rst: fix typos 2025-08-22 20:50:13 +08:00
.gitignore docs/tags: Introduce tagging feature to the documentation. 2025-04-29 09:18:25 +02:00
conf.py docs: Update the ELF guides 2025-06-11 23:11:08 +08:00
glossary.rst rename doc/ -> Documentation/ 2020-08-24 10:29:55 -07:00
index.rst Documentation: review supported POSIX interfaces in NuttX 2025-06-12 10:13:52 -03:00
known-warnings.txt fs: Add VFS docs 2024-02-20 18:28:09 -08:00
legacy_README.md Documentation: fix spelling 2025-05-15 11:33:41 +08:00
make.bat Documentation: Remove all tail spaces from *.rst and *.html 2020-10-18 10:51:22 -07:00
Makefile docs/tags: Introduce tagging feature to the documentation. 2025-04-29 09:18:25 +02:00
Pipfile docs: Fix pipenv lockfile for older Python versions 2025-06-11 23:11:08 +08:00
Pipfile.lock build(deps): bump tornado from 6.4.2 to 6.5.1 in /Documentation 2025-06-12 19:09:47 +08:00
substitutions.rst Remove the double blank line from source files 2022-02-20 20:10:14 +01:00