HT32SX Monarch Scan
Monarch Scan application for HT32SX
tim.h
Go to the documentation of this file.
1 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef __tim_H
21 #define __tim_H
22 #ifdef __cplusplus
23  extern "C" {
24 #endif
25 
26 /* Includes ------------------------------------------------------------------*/
27 #include "main.h"
28 
29 /* USER CODE BEGIN Includes */
30 #include "gpio.h"
31 #include "rtc.h"
32 #include "usart.h"
33 #include "st_rf_api.h"
34 /* USER CODE END Includes */
35 
36 extern TIM_HandleTypeDef htim6;
37 
38 /* USER CODE BEGIN Private defines */
39 
48 #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));}
49 
50 /* USER CODE END Private defines */
51 
52 void MX_TIM6_Init(void);
53 
54 /* USER CODE BEGIN Prototypes */
55 
66 extern void SdkEvalTimersTimConfig(TIM_HandleTypeDef* TIM_TimeBaseStructure, uint16_t nPrescaler, uint16_t nPeriod);
67 
75 extern void SdkEvalTimersFindFactors(uint32_t lCycles, uint16_t *pnPrescaler, uint16_t *pnCounter);
76 
77 /*!******************************************************************
78  * \fn void setNotifyEndFlag(uint8_t notifyEnd)
79  * \brief Set notify end flag.
80  *
81  * \param[in] notifyEnd 1 or 0
82  * \param[out] none
83  *
84  * \retval none
85  *******************************************************************/
86 extern void setNotifyEndFlag(uint8_t notifyEnd);
87 
88 /*!******************************************************************
89  * \fn void setNIntermediateTimIrqFlag(uint8_t nIntermediateTimeIrq)
90  * \brief Set N intermediate TIM IRQ flag.
91  *
92  * \param[in] nIntermediateTimeIrq 1 or 0
93  * \param[out] none
94  *
95  * \retval none
96  *******************************************************************/
97 extern void setNIntermediateTimIrqFlag(uint8_t nIntermediateTimeIrq);
98 
99 /*!******************************************************************
100  * \fn uint8_t getNotifyEndFlag(void)
101  * \brief Get notify end flag.
102  *
103  * \param[in] none
104  * \param[out] none
105  *
106  * \retval notify_end 1 or 0
107  *******************************************************************/
108 extern uint8_t getNotifyEndFlag(void);
109 
110 /*!******************************************************************
111  * \fn uint32_t getNIntermediateTimIrqFlag(void);
112  * \brief Get N intermediate TIM IRQ flag.
113  *
114  * \param[in] none
115  * \param[out] none
116  *
117  * \retval n_intermediate_tim_irq 1 or 0
118  *******************************************************************/
119 extern uint32_t getNIntermediateTimIrqFlag(void);
120 
121 /* USER CODE END Prototypes */
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 #endif /*__ tim_H */
127 
136 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
setNIntermediateTimIrqFlag
void setNIntermediateTimIrqFlag(uint8_t nIntermediateTimeIrq)
Set N intermediate TIM IRQ flag.
Definition: tim.c:393
getNotifyEndFlag
uint8_t getNotifyEndFlag(void)
Get notify end flag.
Definition: tim.c:398
usart.h
: This file provides code for the configuration of the USART instances.
setNotifyEndFlag
void setNotifyEndFlag(uint8_t notifyEnd)
Set notify end flag.
Definition: tim.c:389
SdkEvalTimersTimConfig
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...
Definition: tim.c:139
main.h
: Header for main.c file. This file contains the common defines of the application.
gpio.h
: This file contains all the functions prototypes for the gpio
st_rf_api.h
Sigfox manufacturer functions.
SdkEvalTimersFindFactors
void SdkEvalTimersFindFactors(uint32_t lCycles, uint16_t *pnPrescaler, uint16_t *pnCounter)
Computes two integer value prescaler and period such that Cycles = prescaler * period.
Definition: tim.c:111
rtc.h
: This file provides code for the configuration of the RTC instances.
getNIntermediateTimIrqFlag
uint32_t getNIntermediateTimIrqFlag(void)
Get N intermediate TIM IRQ flag.
Definition: tim.c:402