nuttx/drivers
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
..
1wire drivers/1wire/1wire_ds2xxx.h: add the driver for DS2XXX eeproms. 2025-10-10 08:55:45 +02:00
aie drivers: unify Private Types banners 2025-05-28 10:17:15 +08:00
analog sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
audio timers/oneshot: Remove all callback and args. 2025-11-18 13:02:29 +01:00
bch drivers/fs: Control the behavior of FTL by passing oflags during the open process. 2025-07-16 14:11:41 +08:00
can nuttx/can: add message alignment 2025-11-24 14:11:41 +08:00
clk style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
contactless sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
coresight arch | boards | drivers: fix whitespace issues for switch case statements 2025-05-23 10:48:41 +08:00
crypto sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
devicetree style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
dma drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dummy drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
eeprom drivers/eeprom/spi_xx25xx: Multi-device SPI bus support 2025-11-18 09:37:07 -03:00
efuse drivers: unify Private Types banners 2025-05-28 10:17:15 +08:00
i2c fs/drivers: Avoid causing a busy loop in the program due to context switching induced by sem_post. 2025-03-17 10:44:26 +01:00
i2s drivers/i2s/i2schar: Implement blocking read/write operations 2025-08-27 11:07:05 +08:00
i3c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
input sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
ioexpander drivers/ioexpander/aw9523b: New driver for AW9523B i/o expander 2025-08-29 09:10:50 -03:00
ipcc style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
lcd sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
leds sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
loop drivers/iovec: revert vector io implement from loop/null/zero driver 2025-01-22 11:29:39 +08:00
math drivers: unify Private Types banners 2025-05-28 10:17:15 +08:00
misc sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
mmcsd sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
modem sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
motor sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
mtd drivers/mtd/at25ee: Multi-device SPI bus support 2025-11-18 09:37:07 -03:00
net sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
note note/notestream: Call lib_fileoutstream_open in notefile_register 2025-06-17 20:58:13 +08:00
pci pci: epf test default a function 2025-08-16 19:49:08 +08:00
pinctrl drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pipes fs/drivers: Avoid causing a busy loop in the program due to context switching induced by sem_post. 2025-03-17 10:44:26 +01:00
power sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
rc style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
regmap style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
reset style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rf drivers/rf: migrate license to ASF 2024-11-06 19:46:13 +08:00
rmt drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsg sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
rptun style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
segger drivers/segger: Add a kconfig to override Segger SystemView target sources version 2025-07-22 23:21:31 +08:00
sensors drivers/sensors: Fix Kconfig 2025-11-18 09:16:12 -03:00
serial uart_pl011: "pl011_irq_tx_ready" and "pl011_txready" is reversed. 2025-11-10 14:15:19 +08:00
spi sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
syslog Documentation: Add description for early_syslog() 2025-10-31 08:29:17 -03:00
thermal style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
timers timers/arch_alarm: Fix oneshot callback for non-tickless. 2025-11-19 12:24:56 +08:00
usbdev sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
usbhost drivers/usbhost_hub: Add support to Multiple TT HS HUB 2025-10-27 18:24:42 +08:00
usbmisc sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
usbmonitor sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
usrsock drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
vhost style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
video sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
virtio kasan: kasan_reset_tag rename kasan_clear_tag 2025-06-30 18:19:38 +08:00
wireless sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
.gitignore
CMakeLists.txt drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
drivers_initialize.c usbhost: add common usb host waiter and drivers initialization 2025-05-15 21:58:57 +08:00
Kconfig AI engine driver 2024-10-16 13:57:23 +08:00
Makefile drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00