VSF Documented
sthal.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18/*============================ INCLUDES ======================================*/
19
20#ifndef __ST_HAL_H__
21#define __ST_HAL_H__
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/*============================ INCLUDES ======================================*/
28
29#include "hal/vsf_hal.h"
30
31#ifdef VSF_STHAL_CONF_HEADER
32# include VSF_STHAL_CONF_HEADER
33#else
34# include "sthal_conf_template.h"
35#endif
36
37#include "sthal_def.h"
38
39/*============================ MACROS ========================================*/
40/*============================ MACROFIED FUNCTIONS ===========================*/
41/*============================ TYPES =========================================*/
42
43typedef enum {
49
50typedef enum {
51 RESET = 0U,
52 SET = !RESET
54
55typedef enum {
56 DISABLE = 0U,
59
60typedef enum {
61 SUCCESS = 0U,
62 ERROR = !SUCCESS
64
65/*============================ GLOBAL VARIABLES ==============================*/
66
67extern volatile uint32_t uwTick;
69
70/*============================ LOCAL VARIABLES ===============================*/
71/*============================ PROTOTYPES ====================================*/
72
75void HAL_MspInit(void);
76void HAL_MspDeInit(void);
78void HAL_IncTick(void);
79void HAL_Delay(uint32_t Delay);
83void HAL_SuspendTick(void);
84void HAL_ResumeTick(void);
87
88/*============================ INCLUDES ======================================*/
89
90#ifdef HAL_GPIO_MODULE_ENABLED
91# include "sthal_gpio.h"
92#endif
93
94#ifdef HAL_DMA_MODULE_ENABLED
95# include "sthal_dma.h"
96#endif
97
98#ifdef HAL_ADC_MODULE_ENABLED
99# include "sthal_adc.h"
100#endif
101
102#ifdef HAL_EXTI_MODULE_ENABLED
103# include "sthal_exti.h"
104#endif
105
106#ifdef HAL_FLASH_MODULE_ENABLED
107# include "sthal_flash.h"
108#endif
109
110#ifdef HAL_I2C_MODULE_ENABLED
111# include "sthal_i2c.h"
112#endif
113
114#ifdef HAL_RTC_MODULE_ENABLED
115# include "sthal_rtc.h"
116#endif
117
118#ifdef HAL_SPI_MODULE_ENABLED
119# include "sthal_spi.h"
120#endif
121
122#ifdef HAL_TIM_MODULE_ENABLED
123# include "sthal_tim.h"
124#endif
125
126#ifdef HAL_UART_MODULE_ENABLED
127# include "sthal_uart.h"
128#endif
129
130#ifdef HAL_USART_MODULE_ENABLED
131# include "sthal_usart.h"
132#endif
133
134#ifdef HAL_IRDA_MODULE_ENABLED
135# include "sthal_irda.h"
136#endif
137
138#ifdef HAL_SMARTCARD_MODULE_ENABLED
139# include "sthal_smartcard.h"
140#endif
141
142#ifdef HAL_WWDG_MODULE_ENABLED
143# include "sthal_wwdg.h"
144#endif
145
146#ifdef __cplusplus
147}
148#endif
149
150#endif
unsigned uint32_t
Definition stdint.h:9
void HAL_ResumeTick(void)
Definition sthal.c:84
enum FlagStatus ITStatus
HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq)
Definition sthal.c:71
uint32_t HAL_GetUIDw2(void)
HAL_TickFreqTypeDef HAL_GetTickFreq(void)
Definition sthal.c:90
ErrorStatus
Definition sthal.h:60
@ ERROR
Definition sthal.h:62
@ SUCCESS
Definition sthal.h:61
HAL_TickFreqTypeDef uwTickFreq
Definition sthal.c:44
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
Definition sthal.c:51
FlagStatus
Definition sthal.h:50
@ RESET
Definition sthal.h:51
@ SET
Definition sthal.h:52
HAL_StatusTypeDef HAL_DeInit(void)
Definition sthal.c:150
volatile uint32_t uwTick
Definition sthal.c:43
void HAL_IncTick(void)
Definition sthal.c:58
void HAL_SuspendTick(void)
Definition sthal.c:78
HAL_TickFreqTypeDef
Definition sthal.h:43
@ HAL_TICK_FREQ_DEFAULT
Definition sthal.h:47
@ HAL_TICK_FREQ_1KHZ
Definition sthal.h:46
@ HAL_TICK_FREQ_10HZ
Definition sthal.h:44
@ HAL_TICK_FREQ_100HZ
Definition sthal.h:45
FunctionalState
Definition sthal.h:55
@ ENABLE
Definition sthal.h:57
@ DISABLE
Definition sthal.h:56
void HAL_MspDeInit(void)
Definition sthal.c:162
void HAL_MspInit(void)
Definition sthal.c:156
void HAL_Delay(uint32_t Delay)
Definition sthal.c:96
HAL_StatusTypeDef HAL_Init(void)
Definition sthal.c:131
uint32_t HAL_GetTick(void)
Definition sthal.c:124
uint32_t HAL_GetHalVersion(void)
Definition sthal.c:167
HAL_StatusTypeDef
Definition sthal_def.h:65