From ec6722ba287890d59e48ed21529efc2cdc1c6b58 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Sat, 25 Jul 2015 00:54:19 +0300 Subject: [PATCH] STM32: simple init overload --- .../stm32/driver/include/uavcan_stm32/can.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/can.hpp b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/can.hpp index 473a76a960..900d90b444 100644 --- a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/can.hpp +++ b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/can.hpp @@ -281,6 +281,17 @@ public: driver(queue_storage_) { } + /** + * This overload simply configures the provided bitrate. + * Auto bit rate detection will not be performed. + * Bitrate value must be positive. + * @return Negative value on error; non-negative on success. + */ + int init(uavcan::uint32_t bitrate) + { + return driver.init(bitrate, CanIface::NormalMode); + } + /** * This function can either initialize the driver at a fixed bit rate, or it can perform * automatic bit rate detection. For theory please refer to the CiA application note #801.