tao_z
2022-05-25 1044ba0d2286698d0da28112bffc0f114bef2134
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
  ******************************************************************************
  * @file     system_xl6600.h
  * @author   xu.wang
  * @version  V3.0.0
  * @date     4-Jun-2019
  * @brief    This file contains all the functions prototypes for the system
  *           firmware library.
  ******************************************************************************
  * @attention
    *
  * 2019 by Chipways Communications,Inc. All Rights Reserved.
  * This software is supplied under the terms of a license
  * agreement or non-disclosure agreement with Chipways.
  * Passing on and copying of this document,and communication
  * of its contents is not permitted without prior written
  * authorization.
  *
  * <h2><center>&copy; COPYRIGHT 2019 Chipways</center></h2>
  ******************************************************************************
  */
 
/* Define to prevent recursive inclusion -------------------------------------*/    
#ifndef SYSTEM_XL6600_H_
#define SYSTEM_XL6600_H_                      /**< Symbol preventing repeated inclusion */
 
#ifdef __cplusplus
extern "C" {
#endif
 
#include "typedef.h"
 
 
/** @addtogroup XL6600_StdPeriph_Driver
  * @{
  */
    
/** @addtogroup system
  * @{
  */
 
/* Exported types ------------------------------------------------------------*/ 
 
    
/* Exported constants --------------------------------------------------------*/
    
    
typedef enum {
    SYS_CLK_OK = 0,
    OSC_INIT_ERROR = 1,
    OSC_DIV_ERROR = 2,
    ICS_STATUS_UNLOCK = 3,
    FLASH_INIT_ERROR = 4
}SYS_CLK_STATUS;    
    
/**
    * @defgroup OSC_CLOCK   OSCʱÖÓºÍ·ÖÆµ¶¨Òå
    * @{
    */
//#define OSC_CLOCK_HZ      24000000
//#define OSC_RDIV              512
/**
  * @}
  */
    
/**
  * @}
  */
                                                                                        
/**
  * @}
  */
 
/* Exported macro ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/ 
void SystemInit (void);
SYS_CLK_STATUS SystemSetFEI(uint8_t ICS_IRCSel,uint8_t ICS_FLLFSel);
SYS_CLK_STATUS SystemSetFEE(uint32_t osc_clkfre, uint8_t ICS_FLLFSel, uint8_t osc_bdiv,uint8_t osc_bdiv2);
uint32_t SystemSetFBI(void);
void SystemSetFBILP(void);
void SystemSetFBE(uint32_t osc_clkfre);
void SystemSetFBELP(void);
uint32_t Get_ICSOUTClock(void);
uint32_t Get_SystemCoreClock(void);
uint32_t Get_FTM_PWT_Clock(void);
uint32_t Get_BusClock(void);
uint32_t Get_PeripheralClock(void);
 
#ifdef __cplusplus
}
#endif
 
#endif  
/**
  * @}
  */
 
/**
  * @}
  */