![]() |
RTEMS 7.0-rc1
|
This source file is part of CAN/CAN FD bus common support. It implements bit timing calculation. More...
Macros | |
| #define | CAN_CALC_MAX_ERROR 50 /* in one-tenth of a percent */ |
| #define | CAN_CALC_SYNC_SEG 1 |
Functions | |
| int | rtems_can_bitrate2bittiming (struct rtems_can_chip *chip, struct rtems_can_bittiming *bt, const struct rtems_can_bittiming_const *btc) |
| This function calculates CAN bit timing for given bit rate. | |
This source file is part of CAN/CAN FD bus common support. It implements bit timing calculation.
Implementation is based on original LinCAN - Linux CAN bus driver Part of OrtCAN project https://ortcan.sourceforge.net/
| int rtems_can_bitrate2bittiming | ( | struct rtems_can_chip * | chip, |
| struct rtems_can_bittiming * | bt, | ||
| const struct rtems_can_bittiming_const * | btc | ||
| ) |
This function calculates CAN bit timing for given bit rate.
This calculates bit timing values for given bit rate (provided in bt input argument) and controller's maximum/minimal values given by btc argument.
| chip | Pointer to rtems_can_chip structure. |
| bt | Pointer to rtems_can_bittiming structure. Calculated values are stored here. |
| btc | Pointer to rtems_can_bittiming_const structure. This provides maximum and minimal bit timing values of the controller. |