Commit graph

12 commits

Author SHA1 Message Date
Henrik Brix Andersen 5d5249d85b drivers: can: unify spelling of CAN Flexible Data-rate abbreviation
Unify spelling of CAN Flexible Data-rate abbreviation to "CAN FD" instead
of "CAN-FD". The former aligns with the CAN in Automation (CiA)
recommendation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-01 11:17:17 +00:00
Martin Jäger 6b0135b151 canbus: isotp: rename ctx function parameters to rctx/sctx
This makes clear if the context is a recv_ctx or a send_ctx and
improves code readability.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-21 11:54:11 +02:00
Grant Ramsay a4383c2fd1 canbus: isotp: add CAN-FD support
ISO-TP CAN-FD support can be enabled at runtime.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-14 08:34:09 +02:00
Martin Jäger f13791d5ba canbus: isotp: use flags for configuration in isotp_msg_id
The previous design with dedicated bits in the structure required a
user to explicitly set each bit.

Using one flags variable allows to extend the features more easily
in the future and avoids breaking existing code.

This change is particularly useful for the FDF and BRS flags required
for CAN-FD support.

See also previous similar change for the CAN driver in
f8a88cdb27

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-07 09:43:56 +02:00
Martin Jäger 7f7201f79b canbus: isotp: replace internal z_timeout with k_timer
The use of private APIs z_add_timeout() and friends is not recommended.

With this commit, usual kernel timer APIs are used.

Fixes #61738

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-08-29 16:14:35 +02:00
Henrik Brix Andersen b18f229fc8 canbus: isotp: group CAN ISO-TP doxygen documentation under connectivity
Move the CAN ISO-TP protocol API documentation from having its own
top-level module to being grouped with the other connectivity APIs.

Change the API documentation header to reflect that this is a protocol.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-25 13:14:39 +02:00
Benjamin Cabé 5f9e698da4 canbus: isotp: doc: Document isotp_tx_callback_t
Added missing Doxygen doc for isotp_tx_callback_t

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-19 21:41:39 -04:00
William MARTIN e121ea28d9 canbus: isotp: Allow to override ISOTP_FIXED_ADDR_* constants
This patch allow to use isotp use_fixed_addr feature
with CAN identifier which not match SAE J1939 format.


Signed-off-by: William MARTIN <william.martin@power-lan.com>
2023-04-06 19:43:02 +02:00
Peter Mitsis 4ab9be98df canbus: isotp: Fix typo in function descriptions
Fixes the return value descriptions for functions isotp_recv() and
isotp_recv_net() as they mistakenly referred to ISOTP_WAIT_TIMEOUT
instead of ISOTP_RECV_TIMEOUT.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-02-22 15:09:58 -05:00
Henrik Brix Andersen a9c7c58345 canbus: isotp: avoid reusing CAN controller driver API definitions
Avoid reusing the CAN_EXTENDED_IDENTIFIER and CAN_STANDARD_IDENTIFIER
definitions from the CAN controller driver API for ISO-TP structure members
as this is a fragile design.

The ISO-TP layer must be responsible for its own definitions where
needed. Replace the "id_type" ISO-TP struct member with a well-known
abbreviated "ide" bit (Identifier Extension Bit) struct member.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Gerard Marull-Paretas fb9b3bcd93 include: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all includes within
include directory to the new prefix <zephyr/...>. Note that the
conversion has been scripted, refer to zephyrproject-rtos#45388 for more
details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:03:00 +02:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00