SPKT

Dependents:   WAV

Committer:
phungductung
Date:
Tue Jun 04 21:51:46 2019 +0000
Revision:
0:e87aa4c49e95
libray

Who changed what in which revision?

UserRevisionLine numberNew contents of line
phungductung 0:e87aa4c49e95 1 /**
phungductung 0:e87aa4c49e95 2 ******************************************************************************
phungductung 0:e87aa4c49e95 3 * @file hal_tick.h
phungductung 0:e87aa4c49e95 4 * @author MCD Application Team
phungductung 0:e87aa4c49e95 5 * @brief Initialization of HAL tick
phungductung 0:e87aa4c49e95 6 ******************************************************************************
phungductung 0:e87aa4c49e95 7 * @attention
phungductung 0:e87aa4c49e95 8 *
phungductung 0:e87aa4c49e95 9 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
phungductung 0:e87aa4c49e95 10 *
phungductung 0:e87aa4c49e95 11 * Redistribution and use in source and binary forms, with or without modification,
phungductung 0:e87aa4c49e95 12 * are permitted provided that the following conditions are met:
phungductung 0:e87aa4c49e95 13 * 1. Redistributions of source code must retain the above copyright notice,
phungductung 0:e87aa4c49e95 14 * this list of conditions and the following disclaimer.
phungductung 0:e87aa4c49e95 15 * 2. Redistributions in binary form must reproduce the above copyright notice,
phungductung 0:e87aa4c49e95 16 * this list of conditions and the following disclaimer in the documentation
phungductung 0:e87aa4c49e95 17 * and/or other materials provided with the distribution.
phungductung 0:e87aa4c49e95 18 * 3. Neither the name of STMicroelectronics nor the names of its contributors
phungductung 0:e87aa4c49e95 19 * may be used to endorse or promote products derived from this software
phungductung 0:e87aa4c49e95 20 * without specific prior written permission.
phungductung 0:e87aa4c49e95 21 *
phungductung 0:e87aa4c49e95 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
phungductung 0:e87aa4c49e95 23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
phungductung 0:e87aa4c49e95 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
phungductung 0:e87aa4c49e95 25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
phungductung 0:e87aa4c49e95 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
phungductung 0:e87aa4c49e95 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
phungductung 0:e87aa4c49e95 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
phungductung 0:e87aa4c49e95 29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
phungductung 0:e87aa4c49e95 30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
phungductung 0:e87aa4c49e95 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
phungductung 0:e87aa4c49e95 32 *
phungductung 0:e87aa4c49e95 33 ******************************************************************************
phungductung 0:e87aa4c49e95 34 */
phungductung 0:e87aa4c49e95 35 #ifndef __HAL_TICK_H
phungductung 0:e87aa4c49e95 36 #define __HAL_TICK_H
phungductung 0:e87aa4c49e95 37
phungductung 0:e87aa4c49e95 38 #ifdef __cplusplus
phungductung 0:e87aa4c49e95 39 extern "C" {
phungductung 0:e87aa4c49e95 40 #endif
phungductung 0:e87aa4c49e95 41
phungductung 0:e87aa4c49e95 42 #include "stm32f7xx.h"
phungductung 0:e87aa4c49e95 43 #include "cmsis_nvic.h"
phungductung 0:e87aa4c49e95 44
phungductung 0:e87aa4c49e95 45 #define TIM_MST TIM5
phungductung 0:e87aa4c49e95 46 #define TIM_MST_IRQ TIM5_IRQn
phungductung 0:e87aa4c49e95 47 #define TIM_MST_RCC __TIM5_CLK_ENABLE()
phungductung 0:e87aa4c49e95 48
phungductung 0:e87aa4c49e95 49 #define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
phungductung 0:e87aa4c49e95 50 #define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
phungductung 0:e87aa4c49e95 51
phungductung 0:e87aa4c49e95 52 #define HAL_TICK_DELAY (1000) // 1 ms
phungductung 0:e87aa4c49e95 53
phungductung 0:e87aa4c49e95 54 HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority);
phungductung 0:e87aa4c49e95 55
phungductung 0:e87aa4c49e95 56 #ifdef __cplusplus
phungductung 0:e87aa4c49e95 57 }
phungductung 0:e87aa4c49e95 58 #endif
phungductung 0:e87aa4c49e95 59
phungductung 0:e87aa4c49e95 60 #endif // __HAL_TICK_H
phungductung 0:e87aa4c49e95 61
phungductung 0:e87aa4c49e95 62 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/