Skip to content

Commit

Permalink
Formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fastbike authored and aentinger committed May 3, 2024
1 parent 30f0467 commit 3497024
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libraries/Arduino_CAN/src/R7FA4M1_CAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ bool R7FA4M1_CAN::begin(uint32_t const can_bitrate)

/* Calculate the CAN bitrate based on the value of this functions parameter.
*/
static uint32_t const F_CAN_CLK_Hz = 24*1000*1000UL;
static uint32_t const F_CAN_CLK_Hz = 24*1000*1000UL;
static uint32_t const TQ_MIN = 8;
static uint32_t const TQ_MAX = 25;
static uint32_t const TSEG_1_MIN = 4;
Expand All @@ -172,7 +172,7 @@ bool R7FA4M1_CAN::begin(uint32_t const can_bitrate)
auto [is_valid_baudrate, baud_rate_prescaler, time_segment_1, time_segment_2] =
util::calc_can_bit_timing(can_bitrate, F_CAN_CLK_Hz, TQ_MIN, TQ_MAX, TSEG_1_MIN, TSEG_1_MAX, TSEG_2_MIN, TSEG_2_MAX);
init_ok &= is_valid_baudrate;

if (is_valid_baudrate) {
_can_bit_timing_cfg.baud_rate_prescaler = baud_rate_prescaler;
_can_bit_timing_cfg.time_segment_1 = time_segment_1;
Expand All @@ -187,7 +187,6 @@ bool R7FA4M1_CAN::begin(uint32_t const can_bitrate)
return init_ok;
}

////////////////////////
void R7FA4M1_CAN::end()
{
R_CAN_Close(&_can_ctrl);
Expand Down

0 comments on commit 3497024

Please sign in to comment.