2 ******************************************************************************
\r
3 * @file tsl_time_stm32l1xx.c
\r
4 * @author MCD Application Team
\r
6 * @date 22-January-2013
\r
7 * @brief This file contains all functions to manage the timing with STM32L1xx products.
\r
8 ******************************************************************************
\r
11 * <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
\r
13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
\r
14 * You may not use this file except in compliance with the License.
\r
15 * You may obtain a copy of the License at:
\r
17 * http://www.st.com/software_license_agreement_liberty_v2
\r
19 * Unless required by applicable law or agreed to in writing, software
\r
20 * distributed under the License is distributed on an "AS IS" BASIS,
\r
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
22 * See the License for the specific language governing permissions and
\r
23 * limitations under the License.
\r
25 ******************************************************************************
\r
28 /* Includes ------------------------------------------------------------------*/
\r
29 #include "tsl_time_stm32l1xx.h"
\r
31 /* Private typedefs ----------------------------------------------------------*/
\r
32 /* Private defines -----------------------------------------------------------*/
\r
33 /* Private macros ------------------------------------------------------------*/
\r
34 /* Private variables ---------------------------------------------------------*/
\r
35 /* Private functions prototype -----------------------------------------------*/
\r
38 * @brief Initialization of the timing module.
\r
40 * @retval Status Return TSL_STATUS_ERROR if the Systick configuration has failed.
\r
42 TSL_Status_enum_T TSL_tim_Init(void)
\r
44 // Program one systick interrupt every (1 / TSLPRM_TICK_FREQ) ms
\r
45 if (SysTick_Config(SystemCoreClock / TSLPRM_TICK_FREQ))
\r
47 return TSL_STATUS_ERROR;
\r
51 return TSL_STATUS_OK;
\r
55 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r