precision-converters-firmware
Loading...
Searching...
No Matches
stm32_pwm_ex.h
Go to the documentation of this file.
1/***************************************************************************/
13#ifndef _STM32_PWM_EX_H_
14#define _STM32_PWM_EX_H_
15
16/******************************************************************************/
17/***************************** Include Files **********************************/
18/******************************************************************************/
19#include "stm32_pwm.h"
20
21/******************************************************************************/
22/********************** Variables and User Defined Data Types *****************/
23/******************************************************************************/
24
25/******************************************************************************/
26/************************ Public Declarations *********************************/
27/******************************************************************************/
28int32_t compute_optimal_prescaler(struct stm32_pwm_desc *desc,
29 uint64_t period_ns,
30 uint32_t *prescaler);
31
32#endif // _STM32_PWM_EX_H_
int32_t compute_optimal_prescaler(struct stm32_pwm_desc *desc, uint64_t period_ns, uint32_t *prescaler)
Calculate optimal prescaler value to fit the period in ARR register.
Definition stm32_pwm_ex.c:42