forked from stm32duino/Arduino_Core_STM32
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathclock.h
49 lines (40 loc) · 1.45 KB
/
clock.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
*******************************************************************************
* Copyright (c) 2016-2021, STMicroelectronics
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
*******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __CLOCK_H
#define __CLOCK_H
/* Includes ------------------------------------------------------------------*/
#include "stm32_def.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported types ------------------------------------------------------------*/
/* Clock source selection */
typedef enum {
LSI_CLOCK,
HSI_CLOCK,
LSE_CLOCK,
HSE_CLOCK
} sourceClock_t;
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
uint32_t getCurrentMillis(void);
uint32_t getCurrentMicros(void);
void enableClock(sourceClock_t source);
void configHSECapacitorTuning(void);
#ifdef __cplusplus
}
#endif
#endif /* __CLOCK_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/