]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
helper: add bitfield helper macros
authorWalter Ji <walter.ji@oss.cipunited.com>
Mon, 4 Mar 2024 09:29:15 +0000 (17:29 +0800)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 17 May 2025 08:42:05 +0000 (08:42 +0000)
commite30828a2769c294a9d2a36ed10f1f3516d82d1c1
treee4ccc6864f4679be7dbdddfe12496e2ed24107bf
parent744955e5b4f4f943c187622f4ae977bc4cd6fdb7
helper: add bitfield helper macros

This patch ports FIELD_{GET,PREP,FIT} macros and related macro
from FreeBSD, referenced file:
- `src/tree/sys/compat/linuxkpi/common/include/linux/bitfield.h`

Checkpatch-ignore: MACRO_ARG_REUSE

Change-Id: I6fdf4514d3f95d62fadf7654409a4878d470a600
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8171
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/helper/Makefile.am
src/helper/bitfield.h [new file with mode: 0644]