zephyr/doc
Henrik Brix Andersen f8a88cdb27 drivers: can: use flags fields for can_frame and can_filter structs
The can_frame and can_filter structs support a number of different flags
(standard/extended CAN ID type, Remote Transmission Request, CAN-FD format,
Bit Rate Switch, ...). Each of these flags is represented as a discrete bit
in the given structure.

This design pattern requires every user of these structs to initialize all
of these flags to either 0 or 1, which does not scale well for future flag
additions.

Some of these flags have associated enumerations to be used for assignment,
some do not. CAN drivers and protocols tend to rely on the logical value of
the flag instead of using the enumeration, leading to a very fragile
API. The enumerations are used inconsistently between the can_frame and
can_filter structures, which further complicates the API.

Instead, convert these flags to bitfields with separate flag definitions
for the can_frame and can_filter structures. This API allows for future
extensions without having to revisit existing users of the two
structures. Furthermore, this allows driver to easily check for unsupported
flags in the respective API calls.

As this change leads to the "id_mask" field of the can_filter to be the
only mask present in that structure, rename it to "mask" for simplicity.

Fixes: #50776

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
..
_doxygen device: move independent groups to groups.dox 2022-10-17 10:13:37 +02:00
_extensions/zephyr doc: extend application sphinx extension to support west arguments 2022-08-12 13:56:55 +02:00
_scripts doc: gen_devicetree_rest: Fix binding doc file name resolution 2022-07-25 15:18:27 +02:00
_static doc: Update PDF documentation Zephyr logo 2022-06-06 00:02:55 +09:00
_templates
build doc: clarify where application can use ExternalZephyrProject_Add 2022-10-19 11:07:03 +02:00
connectivity doc: Add note about -z option to btproxy. 2022-10-25 10:54:09 +02:00
contribute doc: documentation: Fix incorrect doc/Makefile reference 2022-09-29 12:20:14 +02:00
develop doc: add API documentation for USB-C VBUS Driver 2022-10-22 18:38:35 -04:00
hardware drivers: can: use flags fields for can_frame and can_filter structs 2022-10-25 16:32:10 +02:00
images
introduction doc: mention MIPS architecture support 2022-01-24 17:11:42 -05:00
kernel doc: Verify write access in syscall example 2022-10-14 09:56:30 +02:00
project doc: release process: drop the comment about changing the release name 2022-10-24 11:17:00 -04:00
releases doc: release: 3.3: Add note on fixed mcumgr bt sample stack overflow 2022-10-25 16:25:13 +02:00
security doc: security: Fix outdated link 2022-09-29 12:20:14 +02:00
services doc: reference: logging: Add multidomain section 2022-10-17 10:16:53 +02:00
templates
404.rst doc: Suggest filing GitHub issue for broken links 2022-04-28 10:26:03 +02:00
CMakeLists.txt doc: add support for linkcheck 2022-09-23 17:28:47 +00:00
conf.py doc: conf: add release version 3.2.0 2022-09-30 11:31:32 -05:00
glossary.rst doc: use :kconfig:option: domain role 2022-03-02 09:28:37 +01:00
index-tex.rst doc: get rid of reference section 2022-04-07 16:35:19 +02:00
index.rst doc: get rid of reference section 2022-04-07 16:35:19 +02:00
kconfig.rst doc: use new kconfig extension 2022-03-02 09:28:37 +01:00
known-warnings.txt doc: Bluetooth: Document the services APIs 2022-05-24 17:49:17 +02:00
LICENSING.rst
Makefile doc: add support for linkcheck 2022-09-23 17:28:47 +00:00
substitutions.txt
zephyr.doxyfile.in doc: doxyfile: update to 1.9.4 2022-10-17 14:40:31 +09:00