Skip to content

Commit e7db0f8

Browse files
henrikbrixandersenaescolar
authored andcommitted
drivers: can: clarify the meaning of minimum/maximum supported bitrates
Clarify the meaning of of minimum/maximum supported bitrates in the CAN controller driver API. Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent 76f514e commit e7db0f8

File tree

1 file changed

+35
-2
lines changed
  • include/zephyr/drivers

1 file changed

+35
-2
lines changed

include/zephyr/drivers/can.h

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,16 @@ static inline int z_impl_can_get_core_clock(const struct device *dev, uint32_t *
835835
*
836836
* Get the minimum supported bitrate for the CAN controller/transceiver combination.
837837
*
838+
* @note The minimum bitrate represents limitations of the CAN controller/transceiver
839+
* combination. Whether the CAN controller can achieve this bitrate depends on the CAN core clock
840+
* rate and the minimum CAN timing limits.
841+
*
842+
* @see can_get_core_clock()
843+
* @see can_get_timing_min()
844+
* @see can_get_timing_data_min()
845+
*
838846
* @param dev Pointer to the device structure for the driver instance.
839-
* @return Minimum supported bitrate in bits/s
847+
* @return Minimum supported bitrate in bits/s. A value of 0 means the lower limit is unspecified.
840848
*/
841849
__syscall uint32_t can_get_bitrate_min(const struct device *dev);
842850

@@ -854,8 +862,17 @@ static inline uint32_t z_impl_can_get_bitrate_min(const struct device *dev)
854862
*
855863
* @deprecated Use @a can_get_bitrate_min() instead.
856864
*
865+
* @note The minimum bitrate represents limitations of the CAN controller/transceiver
866+
* combination. Whether the CAN controller can achieve this bitrate depends on the CAN core clock
867+
* rate and the minimum CAN timing limits.
868+
*
869+
* @see can_get_core_clock()
870+
* @see can_get_timing_min()
871+
* @see can_get_timing_data_min()
872+
*
857873
* @param dev Pointer to the device structure for the driver instance.
858-
* @param[out] min_bitrate Minimum supported bitrate in bits/s
874+
* @param[out] min_bitrate Minimum supported bitrate in bits/s. A value of 0 means the lower limit
875+
* is unspecified.
859876
*
860877
* @retval -EIO General input/output error.
861878
* @retval -ENOSYS If this function is not implemented by the driver.
@@ -872,6 +889,14 @@ __deprecated static inline int can_get_min_bitrate(const struct device *dev, uin
872889
*
873890
* Get the maximum supported bitrate for the CAN controller/transceiver combination.
874891
*
892+
* @note The maximum bitrate represents limitations of the CAN controller/transceiver
893+
* combination. Whether the CAN controller can achieve this bitrate depends on the CAN core clock
894+
* rate and the maximum CAN timing limits.
895+
*
896+
* @see can_get_core_clock()
897+
* @see can_get_timing_max()
898+
* @see can_get_timing_data_max()
899+
*
875900
* @param dev Pointer to the device structure for the driver instance.
876901
* @return Maximum supported bitrate in bits/s
877902
*/
@@ -891,6 +916,14 @@ static inline uint32_t z_impl_can_get_bitrate_max(const struct device *dev)
891916
*
892917
* @deprecated Use @a can_get_bitrate_max() instead.
893918
*
919+
* @note The maximum bitrate represents limitations of the CAN controller/transceiver
920+
* combination. Whether the CAN controller can achieve this bitrate depends on the CAN core clock
921+
* rate and the maximum CAN timing limits.
922+
*
923+
* @see can_get_core_clock()
924+
* @see can_get_timing_max()
925+
* @see can_get_timing_data_max()
926+
*
894927
* @param dev Pointer to the device structure for the driver instance.
895928
* @param[out] max_bitrate Maximum supported bitrate in bits/s
896929
*

0 commit comments

Comments
 (0)