Добавлен дефайн для расчета тиков исходя из частоты
* надо добавить дефайн для расчета тиков исъходя из периода
This commit is contained in:
@@ -185,6 +185,9 @@ typedef struct // struct with variables for encoder
|
|||||||
@endcode
|
@endcode
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define TIM_FreqToTick(_freq_, _timfreqMHz_) ((1000000*_timfreqMHz_)/_freq_)
|
||||||
|
|
||||||
/* Initialize TIM with TIM_SettingsTypeDef structure */
|
/* Initialize TIM with TIM_SettingsTypeDef structure */
|
||||||
HAL_StatusTypeDef TIM_Base_Init(TIM_SettingsTypeDef* stim);
|
HAL_StatusTypeDef TIM_Base_Init(TIM_SettingsTypeDef* stim);
|
||||||
/* Initialize TIMs clock and interrupt */
|
/* Initialize TIMs clock and interrupt */
|
||||||
|
|||||||
Reference in New Issue
Block a user