Dataloger

Committer:
jhon309
Date:
Thu Aug 20 00:37:14 2015 +0000
Revision:
0:666850d06c9f
ok

Who changed what in which revision?

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