1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-19 03:23:49 +01:00

10 Commits

Author SHA1 Message Date
KSKNico
7a6b83a40c drivers: replace header guards with #pragma once 2025-05-16 19:33:04 +02:00
Marian Buschsieweke
48162bd0a6
Merge pull request #21325 from KSKNico/clang-format-header-fix
treewide: fixing order of doxygen tags and header guards
2025-03-28 16:45:02 +00:00
KSKNico
d357f5388b drivers/include: applied the script to the driver headers 2025-03-28 17:09:07 +01:00
Gilles DOFFE
f05fc0c70f can: introduce loop_delay
During the data phase of a FDCAN transmission only one node is
transmitting, all others are receivers. The length of the bus line has
no impact.
When transmitting via pin FDCAN_TX the protocol controller receives the
transmitted data from its local CAN transceiver via pin FDCAN_RX. The
received data is delayed by the CAN transceiver loop delay.
If this delay is greater than TSEG1 (time segment before sample point),
a bit error is detected. Without transceiver delay compensation, the bit
rate in the data phase of a FDCAN frame is limited by the transceiver's
loop delay.

Since this parameter is related to the transceiver used, there cannot be
a default value, and it must be explicitly defined with the
configuration variable CONFIG_FDCAN_DEVICE_TRANSCEIVER_LOOP_DELAY.

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:23 +01:00
Gilles DOFFE
3c026569f6 can: add CAN FD configuration
Add CAN FD specifities to CAN system library in RIOT:
* 64 bytes payload
* Bit rate switching
* Error State Indicator

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:23 +01:00
Gilles DOFFE
f6f6f6973c can: introduce typedef can_frame_t
Whole CAN code in RIOT is using 'struct can_frame' to represent a CAN
frame.
However incoming CAN FD support will bring 'struct canfd_frame' to
represent CAN FD frames.
Even if the 'struct canfd_frame' has additional flags and a bigger
payload, it is aligned on 'struct can_frame' and thus they can be
referenced by the same pointers in the code.

As it is impossible to predict which one will be used in RIOT, just
define a new type 'can_frame_t' which will map to the right struct
according to the MCU CAN supported format.

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:22 +01:00
Alexandre Abadie
7ce1894da9
drivers/candev: fix non matching argument in doc 2022-01-03 09:51:40 +01:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Alexandre Abadie
268c6b647e drivers/can: fix doxygen documentation + typo 2017-07-03 20:43:51 +02:00
Vincent Dupont
5469ba1d49 can: add CAN stack
The CAN stack support only raw CAN at this time.
It contains a device interface (drivers/include/can/candev.h) and the data link
layer, build around can/device.c can/pkt.c and can/router.c. can/dll.c contains
the upper level and lower level interface to send and receive CAN frames.
Upper layer interface is located in include/can/raw.h
2017-06-19 15:35:26 +02:00