Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
86:04dd9b1680ae
.

Who changed what in which revision?

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