hal_utils_calc_clk_div_integer() function
Calculate the clock division without fractal part
Arguments
clk_info
The clock information
int_div
The clock integral division
Return value
- 0: Failed to get the result because the division is out of range, but parameter `int_div` will still be assigned to min/max division that given in `clk_info`, in case the caller still want to use the min/max division in this case. - others: The real output clock frequency
![]()
uint32_t actual_freq = hal_utils_calc_clk_div_integer(&clk_info, &prescale);
hal_utils_calc_clk_div_integer() is called by 1 function:
![]()
hal_utils_calc_clk_div_integer()
hal_utils_calc_clk_div_integer() reads 7 variables:
![]()
hal_utils_calc_clk_div_integer()