zephyr/modules
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
..
canopennode drivers: can: use flags fields for can_frame and can_filter structs 2022-10-25 16:32:10 +02:00
hal_gigadevice modules: Add option for enabling HAL debug functions 2022-10-03 18:07:16 +02:00
hal_infineon modules: hal_infineon: fix CMake Warning when build non Infineon device 2022-05-16 10:17:29 +02:00
hal_nordic modules: hal_nordic: nrf_802154 serialization race condition fix 2022-09-19 10:31:50 +00:00
hal_nxp drivers: usb: mcux: Restructure driver for SDK updates 2022-09-09 09:44:46 -05:00
hal_rpi_pico modules: hal_rpi_pico: Enable ADC driver 2022-09-06 17:11:19 +02:00
liblc3 modules: liblc3: Rename the module for consistency 2022-08-22 20:40:59 +02:00
littlefs modules: littlefs: use ##__VA_ARGS__ for littlefs log wrappers 2022-09-05 13:41:19 +00:00
loramac-node modules: loramac-node: fix CN470 linking 2022-09-26 09:38:49 +00:00
lz4
mbedtls modules: mbedtls: Replace select statement with depends on for EC 2022-10-07 15:12:42 +02:00
nanopb
openthread drivers: ieee802154: properly announce promisc mode 2022-10-17 16:54:37 +02:00
segger segger: Resolve circular include dependencies 2022-08-02 13:09:21 +02:00
tflite-micro modules: add support for optimized CMSIS-NN kernels 2022-08-18 12:26:51 +02:00
TraceRecorder
trusted-firmware-a modules: tfa: integrate trusted-firmware-a 2022-09-09 16:36:37 +00:00
trusted-firmware-m tfm: Add option to enable the SFN model 2022-10-03 10:17:45 +02:00
uoscore-uedhoc modules: Add uoscore-uedhoc repository 2022-08-12 16:17:59 +02:00
zcbor modules: zcbor: Fix ZCBOR_ASSERT kconfig typo 2022-09-08 15:30:47 +00:00
Kconfig soc: arm: introduce NXP S32Z/E support 2022-10-14 09:51:14 +02:00
Kconfig.altera
Kconfig.atmel
Kconfig.cmsis modules: cmsis_nn: Move Kconfig prompt out of CMSIS-DSP menu 2022-05-04 18:57:41 -04:00
Kconfig.cmsis_dsp modules: cmsis_dsp: Fix missing common tables dependency for SVM 2022-05-05 11:58:11 +09:00
Kconfig.cmsis_nn modules: cmsis: integrate CMSIS-NN 2022-03-22 12:56:02 +01:00
Kconfig.cypress
Kconfig.eos_s3
Kconfig.esp32 soc: xtensa: esp32_net: update kconfig 2022-08-16 18:06:02 +02:00
Kconfig.imx drivers: pinctrl: refactor pin control support for imx rt 2022-05-12 16:57:17 -05:00
Kconfig.infineon drivers: flash: Add xmc4xxx flash drivers 2022-10-03 13:56:49 +02:00
Kconfig.libmetal
Kconfig.lvgl manifest: Update lvgl 2022-08-12 17:54:03 -05:00
Kconfig.mcuboot_bootutil
Kconfig.mcux nxp_imx: rt: add XBARA Inter-Peripheral Crossbar Switch Kconfig option 2022-07-01 16:23:11 +00:00
Kconfig.microchip modules: Add entry for Microchip mpfs hal 2022-05-06 11:32:54 +02:00
Kconfig.nuvoton
Kconfig.open-amp
Kconfig.s32 soc: arm: introduce NXP S32Z/E support 2022-10-14 09:51:14 +02:00
Kconfig.silabs
Kconfig.simplelink
Kconfig.sof
Kconfig.st
Kconfig.stm32 module: Kconfig stm32 includes the DELAYBLOCK (DLYB) 2022-05-12 14:56:25 -05:00
Kconfig.syst
Kconfig.telink
Kconfig.tinycbor modules: tinycbor: Deprecate the module 2022-04-08 15:58:49 +02:00
Kconfig.tinycrypt
Kconfig.vega
Kconfig.wurthelektronik modules: Added hal_wurthelektronik module. 2022-08-31 21:47:58 +00:00
Kconfig.xtensa
modules.cmake