nuttx/include/nuttx
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 1wire DS2XXX: add 1wire and DS2XXX documentation 2025-10-11 07:39:01 -03:00
aie
analog drivers/analog/ads7046: Add support for ADS7046 ADC 2025-08-22 00:29:55 +08:00
audio drivers/i2s/i2schar: Implement ioctl commands for i2schar 2025-08-27 11:07:05 +08:00
binfmt binfmt: Add a configuration flag to store the module filename 2025-11-01 22:59:47 +08:00
can nuttx/can: add message alignment 2025-11-24 14:11:41 +08:00
clk
contactless
coresight style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
crypto
dma
drivers drivers/fs: Control the behavior of FTL by passing oflags during the open process. 2025-07-16 14:11:41 +08:00
eeprom drivers/eeprom/spi_xx25xx: Multi-device SPI bus support 2025-11-18 09:37:07 -03:00
efuse
fs fs/fs.h: Add register_driver_with_size function 2025-11-13 08:57:52 -03:00
himem
hwspinlock
i2c
i3c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
input drivers/input: Create Single Button Multi Actions 2025-07-15 18:39:59 -03:00
ioexpander drivers/ioexpander/aw9523b: New driver for AW9523B i/o expander 2025-08-29 09:10:50 -03:00
lcd style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
leds drivers/leds: Add support for KTD2052 2025-07-07 09:49:51 -03:00
lib lib/math32: improve the performance of invdiv_u32. 2025-10-22 09:46:42 +08:00
math style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
mbox
mm style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
modem style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
motor style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
mtd drivers/mtd/at25ee: Multi-device SPI bus support 2025-11-18 09:37:07 -03:00
net style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
note style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
nx style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
pci drivers/pci: epc add dma heap 2025-08-01 20:47:43 +08:00
pinctrl
power style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rc style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
regmap
reset style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rf include: migrate license to ASF 2024-11-06 19:46:13 +08:00
rmt
rpmsg style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rptun rptun_bmp: add remote_cpu to rptun_secure_init 2025-01-14 13:34:35 +08:00
segger
sensors style/spell: fix spell checker error 2025-10-17 14:05:02 +08:00
serial drivers/serial/serial: prevent race conditions on 8-bit architectures 2025-06-19 10:01:24 -03:00
spi include/nuttx/spi/spi_bitbang: Fix incompatible pointer type issue 2025-09-19 10:15:27 +08:00
syslog sched/syslog: Add early_syslog() for early boot or system down debugging 2025-10-31 08:29:17 -03:00
timers timers: Fix typo. 2025-11-19 12:24:56 +08:00
usb drivers/usbdev: Unregister CDCACM by instance number 2025-10-11 00:47:02 +08:00
usrsock
vhost
video video/fb: add FBIOGET_PANINFOCNT ioctl 2025-10-14 17:50:42 +08:00
virtio
wireless include: fix Private Types banners 2025-05-28 10:17:15 +08:00
.gitignore
addrenv.h modlib/gnu-elf.ld.in: fix regression with armv7a 2025-01-17 23:16:26 +08:00
allsyms.h
arch.h sched/sched: Replace nxsched_alarm_tick_expiration() 2025-10-18 20:07:59 +08:00
ascii.h
atexit.h
atomic.h include/nuttx/atomic.h: Fix C++ compilation with -nostdinc++ 2025-08-08 01:09:34 +08:00
bits.h
board.h style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
cache.h
can.h drivers/can: move CAN utils to CAN common files 2025-05-14 10:30:25 -03:00
cancelpt.h
circbuf.h lib/circbuf: add static initialize macro helper 2024-12-17 20:48:23 +08:00
clock.h sched/clock: Make g_system_ticks a static variable 2025-11-13 18:40:16 -03:00
compiler.h compiler: Support pure function attributes and compile-time constant condition. 2025-11-17 14:15:44 +08:00
coredump.h coredump: fix issue that nvic region overlapped by board memory region 2025-01-24 09:15:56 +08:00
crc8.h libc/crc: Add crc8rohcincr for incremental CRC8 ROHC calculation 2025-09-30 17:30:46 -03:00
crc16.h libs/libc/crc16: Separate implementation of crc16xmodem from crc16 2025-04-10 16:47:28 +08:00
crc32.h
crc64.h
elf.h
environ.h
envpath.h
ethtool.h
event.h [!] sched/event: Remove wait object dependency from event implementation 2025-10-31 19:56:32 -03:00
fdcheck.h
fdt.h qemu/armv7a: register cfi flash 2025-02-11 17:23:44 +08:00
gdbstub.h gdbstub: change send buffer to const char 2025-01-20 20:07:13 +08:00
hashtable.h
idr.h
init.h
instrument.h style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
ipcc.h style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
irq.h sched/spin_lock: rename raw_spin_lock to spin_lock_notrace 2025-02-13 20:48:15 +08:00
kmalloc.h userspace: Exclude nuttx/arch.h 2024-11-01 16:59:37 +08:00
kthread.h
lin.h style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
lirc.h
list.h nuttx/list: Add list_for_every_entry_from() 2025-09-29 19:11:48 +08:00
macro.h arch_atomic : Introduce CONFIG_LIBC_ARCH_ATOMIC 2024-11-15 14:01:56 +08:00
memoryregion.h
mmcsd.h
module.h libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
mqueue.h style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
mutex.h Clean up the nxmutex library 2025-05-08 16:00:05 +08:00
notifier.h spinlock: Fix compilation error with atomic.h. 2025-06-25 22:13:00 +08:00
nuttx.h macro/align: Fix ALIGN_UP and ALIGN_DOWN 2025-01-11 12:13:10 +08:00
page.h
panic_notifier.h
pgalloc.h mm/gran: add gran_alloc_align API 2025-05-12 15:01:37 +08:00
progmem.h
pthread.h pthread: add pthread_attr_{get|set}guardsize support 2025-08-22 20:50:13 +08:00
queue.h
random.h libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
reboot_notifier.h
rwsem.h Revert "shced:sem: replace mutex with spinlock" 2024-10-29 23:01:39 +08:00
sched.h sched/task: move lock to mhead scope 2025-11-01 22:52:07 +08:00
sched_note.h spinlock: Fix compilation error with atomic.h. 2025-06-25 22:13:00 +08:00
scsi.h style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
sdio.h style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
sdio_slave.h style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
semaphore.h sched/semaphore: add support to customize semaphore max allowed value 2025-09-04 09:48:34 +08:00
signal.h sched/signal: Remove shadow definitions to reduce unnecessary API 2025-10-14 17:40:18 +08:00
spawn.h
spinlock.h spinlock: Remove atomic.h inclusion in spinlock_type.h 2025-06-25 22:13:00 +08:00
spinlock_type.h spinlock: Remove atomic.h inclusion in spinlock_type.h 2025-06-25 22:13:00 +08:00
streams.h libc/stream: Add support for lib_scanf 2025-06-20 09:48:39 +08:00
symtab.h
tee.h drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
thermal.h drivers/thermal: Add support for passive trip point 2025-02-16 11:22:41 -03:00
tls.h sched/gettid: Move thread ID to TLS 2025-04-08 22:53:10 +08:00
trace.h
uorb.h drivers/sensor: Add flags for GNSS satellite 2025-08-03 10:41:06 +08:00
userspace.h userspace: Exclude nuttx/arch.h 2024-11-01 16:59:37 +08:00
vt100.h
wdog.h sched/wdog: Add wd_restart_next() for precise wdog restart upon expiration 2025-11-10 23:16:57 +08:00
wqueue.h sched: Add comments for wd_start_next and work_queue_next. 2025-06-10 11:02:45 -03:00
zoneinfo.h