ct_test/Keil_C/List/sc92f_option.lst

218 lines
9.0 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

C51 COMPILER V9.59.0.0 SC92F_OPTION 01/18/2024 10:03:13 PAGE 1
C51 COMPILER V9.59.0.0, COMPILATION OF MODULE SC92F_OPTION
OBJECT MODULE PLACED IN ..\Output\sc92f_option.obj
COMPILER INVOKED BY: D:\Keil_v5\C51\BIN\C51.EXE ..\FWLib\SC92F_Lib\src\sc92f_option.c LARGE OBJECTADVANCED OPTIMIZE(8,SI
-ZE) BROWSE INCDIR(..\FWLib\SC92F_Lib\inc;..\User;..\Apps;..\Apps;..\User) DEFINE(SC92F836xB) DEBUG PRINT(..\List\sc92f_o
-ption.lst) OBJECT(..\Output\sc92f_option.obj)
line level source
1 //************************************************************
2 // Copyright (c) 深圳市赛元微电子有限公司
3 // 文件名称 : sc92f_option.c
4 // 作者 :
5 // 模块功能 : Customer Option寄存器配置C文件
6 // 局部函数列表:
7 // 最后更正日期: 2022/01/24
8 // 版本 : V1.0005
9 // 说明 :
10 //*************************************************************
11
12 #include "sc92f_option.h"
13
14 /*****************************************************
15 *函数名称:void OPTION_WDT_Cmd(FunctionalState NewState)
16 *函数功能:WDT功能开关函数
17 *入口参数:
18 FunctionalState:NewState:功能启动/关闭选择
19 *出口参数:void
20 *****************************************************/
21 void OPTION_WDT_Cmd(FunctionalState NewState)
22 {
23 1 OPINX = 0XC1;
24 1
25 1 if(NewState == DISABLE)
26 1 {
27 2 OPREG &= 0X7F;
28 2 }
29 1 else
30 1 {
31 2 OPREG |= 0X80;
32 2 }
33 1 }
34
35 /*****************************************************
36 *函数名称:void OPTION_XTIPLL_Cmd(FunctionalState NewState)
37 *函数功能:外接晶振使能
38 *入口参数:
39 FunctionalState:NewState:启动/关闭选择
40 *出口参数:void
41 *****************************************************/
42 #if !defined(SC92F848x) && !defined(SC92F748x)
43 void OPTION_XTIPLL_Cmd(FunctionalState NewState)
44 {
45 1 OPINX = 0XC1;
46 1
47 1 if(NewState == DISABLE)
48 1 {
49 2 OPREG &= 0XBF;
50 2 }
51 1 else
52 1 {
53 2 OPREG |= 0X40;
C51 COMPILER V9.59.0.0 SC92F_OPTION 01/18/2024 10:03:13 PAGE 2
54 2 }
55 1 }
56 #endif
57 /*****************************************************
58 *函数名称:void OPTION_SYSCLK_Init(SYSCLK_PresSel_TypeDef SYSCLK_PresSel)
59 *函数功能:系统时钟分频初始化
60 *入口参数:
61 SYSCLK_PresSel_TypeDef:SYSCLK_PresSel:选择系统时钟分频
62 *出口参数:void
63 *****************************************************/
64 void OPTION_SYSCLK_Init(SYSCLK_PresSel_TypeDef
65 SYSCLK_PresSel)
66 {
67 1 OPINX = 0XC1;
68 1 OPREG = OPREG & 0XCF | SYSCLK_PresSel;
69 1 }
70
71 /*****************************************************
72 *函数名称:void OPTION_RST_PIN_Cmd(FunctionalState NewState)
73 *函数功能:外部复位管脚P17使能
74 *入口参数:
75 FunctionalState:NewState:使能/关闭选择
76 *出口参数:void
77 *****************************************************/
78 #if !defined(SC92F848x) && !defined(SC92F748x) && !defined(SC92F859x) && !defined (SC92F759x) && !define
-d(SC92L853x) && !defined (SC92L753x)
79 void OPTION_RST_PIN_Cmd(FunctionalState NewState)
80 {
81 1 OPINX = 0XC1;
82 1
83 1 if(NewState == DISABLE)
84 1 {
85 2 OPREG |= 0X08;
86 2 }
87 1 else
88 1 {
89 2 OPREG &= 0XF7;
90 2 }
91 1 }
92 #endif
93
94 /*****************************************************
95 *函数名称:void OPTION_LVR_Init(LVR_Config_TypeDef LVR_Config)
96 *函数功能:LVR 电压选择
97 *入口参数:
98 LVR_Config_TypeDef:LVR_Config:选择LVR电压
99 *出口参数:void
100 *****************************************************/
101 void OPTION_LVR_Init(LVR_Config_TypeDef
102 LVR_Config)
103 {
104 1 OPINX = 0XC1;
105 1 OPREG = OPREG & 0XF8 | LVR_Config;
106 1 }
107
108 /*****************************************************
109 *函数名称:void OPTION_ADC_VrefConfig(ADC_Vref_TypeDef ADC_Vref)
110 *函数功能:ADC 参考电压选择
111 *入口参数:
112 ADC_Vref_TypeDef:ADC_Vref:选择ADC参考电压
113 *出口参数:void
114 *****************************************************/
C51 COMPILER V9.59.0.0 SC92F_OPTION 01/18/2024 10:03:13 PAGE 3
115 void OPTION_ADC_VrefConfig(ADC_Vref_TypeDef
116 ADC_Vref)
117 {
118 1 OPINX = 0xC2;
119 1 OPREG = OPREG & 0X7F | ADC_Vref;
120 1 }
121
122 /**************************************************
123 *函数名称:void OPTION_IAP_SetOperateRange(IAP_OperateRange_TypeDef IAP_OperateRange)
124 *函数功能:允许IAP操作的范围设置
125 *入口参数:
126 IAP_OperateRange_TypeDef:IAP_OperateRange:IAP操作范围
127 *出口参数:void
128 **************************************************/
129 void OPTION_IAP_SetOperateRange(
130 IAP_OperateRange_TypeDef IAP_OperateRange)
131 {
132 1 OPINX = 0xC2;
133 1 OPREG = (OPREG & 0xF3) | IAP_OperateRange;
134 1 }
135
136 #if defined (SC92F846xB) || defined (SC92F746xB) || defined (SC92F836xB) || defined (SC92F736xB)|| defined
- (SC92F83Ax)\
137 || defined (SC92F73Ax) || defined (SC92F84Ax) || defined (SC92F74Ax) || defined (SC92F740x)\
138 || defined (SC92F8003) || defined (SC92F7003)
139 /*****************************************************
140 *函数名称:void OPTION_XTIPLL_SetRange(XTIPLL_Range_TypeDef XTIPLL_Range)
141 *函数功能:外部高频晶振频率范围
142 *入口参数:
143 XTIPLL_Range_TypeDef:XTIPLL_Range:外部晶振频率选择
144 *出口参数:void
145 *****************************************************/
146 void OPTION_XTIPLL_SetRange(XTIPLL_Range_TypeDef
147 XTIPLL_Range)
148 {
149 1 OPINX = 0XC2;
150 1 OPREG = OPREG & 0XBF | XTIPLL_Range;
151 1 }
152 #endif
153
154 #if defined (SC92F742x)||defined (SC92F83Ax) || defined (SC92F73Ax)|| defined (SC92F84Ax) || defined (SC92
-F74Ax) \
155 ||defined (SC92F74Ax_2)||defined (SC92F84Ax_2)||defined (SC92F844xB)||defined (SC92F744xB) \
156 ||defined (SC92F859x) || defined (SC92F759x) ||defined (SC92F848x) || defined (SC92F748x) || defined (SC
-92L853x) || defined (SC92L753x)
/**************************************************
*函数名称:void OPTION_JTG_Cmd(FunctionalState NewState)
*函数功能:JTAG模式使能开关
*入口参数:
FunctionalState:NewState:功能启动/关闭选择
*出口参数:void
**************************************************/
void OPTION_JTG_Cmd(FunctionalState NewState)
{
OPINX = 0xC2;
if(NewState == DISABLE)
{
OPREG |= 0X10; //1 JTAG无效
}
else
{
C51 COMPILER V9.59.0.0 SC92F_OPTION 01/18/2024 10:03:13 PAGE 4
OPREG &= 0XEF; //0 JTAG有效
}
}
#endif
178 /******************* (C) COPYRIGHT 2020 SinOne Microelectronics *****END OF FILE****/
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 106 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
EDATA SIZE = ---- ----
HDATA SIZE = ---- ----
XDATA CONST SIZE = ---- ----
FAR CONST SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)