HT32SX Monarch Scan
Monarch Scan application for HT32SX
tim.h File Reference

: This file provides code for the configuration of the TIM instances. More...

#include "main.h"
#include "gpio.h"
#include "rtc.h"
#include "usart.h"
#include "st_rf_api.h"

Go to the source code of this file.

Macros

#define SdkEvalTimersState(TIM_HANDLER_P, NEWSTATE)   {((uint8_t)NEWSTATE)?(HAL_TIM_Base_Start_IT(TIM_HANDLER_P)):(HAL_TIM_Base_Stop_IT(TIM_HANDLER_P));}
 Enables or Disables a specific Timer with its IRQ. More...
 

Functions

void MX_TIM6_Init (void)
 
void SdkEvalTimersTimConfig (TIM_HandleTypeDef *TIM_TimeBaseStructure, uint16_t nPrescaler, uint16_t nPeriod)
 Configures the specified timer to raise an interrupt every time the counter reaches the nPeriod value counting with a prescaler of nPrescaler. More...
 
void SdkEvalTimersFindFactors (uint32_t lCycles, uint16_t *pnPrescaler, uint16_t *pnCounter)
 Computes two integer value prescaler and period such that Cycles = prescaler * period. More...
 
void setNotifyEndFlag (uint8_t notifyEnd)
 Set notify end flag. More...
 
void setNIntermediateTimIrqFlag (uint8_t nIntermediateTimeIrq)
 Set N intermediate TIM IRQ flag. More...
 
uint8_t getNotifyEndFlag (void)
 Get notify end flag. More...
 
uint32_t getNIntermediateTimIrqFlag (void)
 Get N intermediate TIM IRQ flag. More...
 

Variables

TIM_HandleTypeDef htim6
 

Detailed Description

: This file provides code for the configuration of the TIM instances.

Attention

© Copyright (c) 2019 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Macro Definition Documentation

◆ SdkEvalTimersState

#define SdkEvalTimersState (   TIM_HANDLER_P,
  NEWSTATE 
)    {((uint8_t)NEWSTATE)?(HAL_TIM_Base_Start_IT(TIM_HANDLER_P)):(HAL_TIM_Base_Stop_IT(TIM_HANDLER_P));}

Enables or Disables a specific Timer with its IRQ.

Parameters
TIMERtimer to be set. This parameter can be a pointer to TIM_TypeDef
NEWSTATEspecifies if a timer has to be enabled or disabled. This parameter is a float.
Return values
None

Function Documentation

◆ getNIntermediateTimIrqFlag()

uint32_t getNIntermediateTimIrqFlag ( void  )

Get N intermediate TIM IRQ flag.


Parameters
[in]none
[out]none
Return values
n_intermediate_tim_irq1 or 0

◆ getNotifyEndFlag()

uint8_t getNotifyEndFlag ( void  )

Get notify end flag.


Parameters
[in]none
[out]none
Return values
notify_end1 or 0

◆ setNIntermediateTimIrqFlag()

void setNIntermediateTimIrqFlag ( uint8_t  nIntermediateTimeIrq)

Set N intermediate TIM IRQ flag.


Parameters
[in]nIntermediateTimeIrq1 or 0
[out]none
Return values
none

◆ setNotifyEndFlag()

void setNotifyEndFlag ( uint8_t  notifyEnd)

Set notify end flag.


Parameters
[in]notifyEnd1 or 0
[out]none
Return values
none