📄 ex_support.s
字号:
.module EX_Support.c
.area text(rom, con, rel)
.dbfile H:\单片机\工程模板\基本工程模板with调度器\EX_Support.c
.area data(ram, con, rel)
.dbfile H:\单片机\工程模板\基本工程模板with调度器\EX_Support.c
_s_wSystemDelayTimerCounter:
.blkb 2
.area idata
.word 0
.area data(ram, con, rel)
.dbfile H:\单片机\工程模板\基本工程模板with调度器\EX_Support.c
.dbsym s s_wSystemDelayTimerCounter _s_wSystemDelayTimerCounter i
_g_wSystemTimer::
.blkb 2
.area idata
.word 0
.area data(ram, con, rel)
.dbfile H:\单片机\工程模板\基本工程模板with调度器\EX_Support.c
.dbsym e g_wSystemTimer _g_wSystemTimer i
.area text(rom, con, rel)
.dbfile H:\单片机\工程模板\基本工程模板with调度器\EX_Support.c
.dbfunc e Driver_INIT _Driver_INIT fV
.even
_Driver_INIT::
.dbline -1
.dbline 85
; /***********************************************************
; * 函数库说明:底层硬件初始化驱动函数库 *
; * 版本: *
; * 作者: *
; * 创建日期: *
; * -------------------------------------------------------- *
; * [硬件说明] *
; * 处理器: *
; * 系统时钟: *
; * -------------------------------------------------------- *
; * [支 持 库] *
; * 支持库名称:PF_Config.h *
; * 需要版本: ----- *
; * 声明库说明:硬件平台配置声明库 *
; * *
; * 支持库名称:HD_Support.h *
; * 需要版本: ----- *
; * 声明库说明:底层硬件初始化声明库 *
; * *
; * 支持库名称:EX_Support.h *
; * 需要版本: ----- *
; * 声明库说明:底层硬件初始化驱动声明库 *
; * -------------------------------------------------------- *
; * [版本更新] *
; * 修改: *
; * 修改日期: *
; * 版本: *
; * -------------------------------------------------------- *
; * [版本历史] *
; * -------------------------------------------------------- *
; * [使用说明] *
; ***********************************************************/
;
; /********************
; * 头 文 件 配 置 区 *
; ********************/
; # include "PF_Config.h"
; # include "EX_Support.h"
;
; /********************
; * 系 统 宏 定 义 *
; ********************/
;
; /*------------------*
; * 常 数 宏 定 义 *
; *------------------*/
;
; /*------------------*
; * 动 作 宏 定 义 *
; *------------------*/
;
; /********************
; * 模块结构体定义区 *
; ********************/
;
; /********************
; * 函 数 声 明 区 *
; ********************/
; void Delay_MS(uint16 wTime);
; void Insert_Timer0_OVF_ISR_Code(void);
; void Driver_INIT(void);
;
; /********************
; * 模块函数声明区 *
; ********************/
;
;
; /********************
; * 模块变量声明区 *
; ********************/
; static uint16 s_wSystemDelayTimerCounter = 0;
;
; /********************
; * 全局变量声明区 *
; ********************/
; uint16 g_wSystemTimer = 0;
;
; /***********************************************************
; * 函数说明:软件驱动初始化函数 *
; * 输入: 无 *
; * 输出: 无 *
; * 调用函数:无 *
; ***********************************************************/
; void Driver_INIT(void)
; {
.dbline 87
; //*在这里插入你的各类软件驱动初始化代码*//
; CMOS_INIT();
rcall _CMOS_INIT
.dbline -2
L1:
.dbline 0 ; func end
ret
.dbend
.dbfunc e Delay_MS _Delay_MS fV
; wTime -> R16,R17
.even
_Delay_MS::
.dbline -1
.dbline 98
; }
;
;
; /***********************************************************
; * 函数说明:系统毫秒延时函数 *
; * 输入: 需要延时的时间长度 *
; * 输出: 无 *
; * 调用函数:无 *
; ***********************************************************/
; void Delay_MS(uint16 wTime)
; {
.dbline 99
; s_wSystemDelayTimerCounter = wTime;
sts _s_wSystemDelayTimerCounter+1,R17
sts _s_wSystemDelayTimerCounter,R16
L3:
.dbline 101
;
; while(s_wSystemDelayTimerCounter);
L4:
.dbline 101
lds R2,_s_wSystemDelayTimerCounter
lds R3,_s_wSystemDelayTimerCounter+1
tst R2
brne L3
tst R3
brne L3
X0:
.dbline -2
L2:
.dbline 0 ; func end
ret
.dbsym r wTime 16 i
.dbend
.dbfunc e Insert_Timer0_OVF_ISR_Code _Insert_Timer0_OVF_ISR_Code fV
.even
_Insert_Timer0_OVF_ISR_Code::
.dbline -1
.dbline 111
; }
;
; /***********************************************************
; * 函数说明:定时器0中断处理程序代码插入函数 *
; * 输入: 无 *
; * 输出: 无 *
; * 调用函数:无 *
; ***********************************************************/
; void Insert_Timer0_OVF_ISR_Code(void)
; {
.dbline 112
; g_wSystemTimer++;
lds R24,_g_wSystemTimer
lds R25,_g_wSystemTimer+1
adiw R24,1
sts _g_wSystemTimer+1,R25
sts _g_wSystemTimer,R24
.dbline 114
;
; if (s_wSystemDelayTimerCounter)
lds R2,_s_wSystemDelayTimerCounter
lds R3,_s_wSystemDelayTimerCounter+1
tst R2
brne X1
tst R3
breq L7
X1:
.dbline 115
; {
.dbline 116
; s_wSystemDelayTimerCounter--;
movw R24,R2
sbiw R24,1
sts _s_wSystemDelayTimerCounter+1,R25
sts _s_wSystemDelayTimerCounter,R24
.dbline 117
; }
L7:
.dbline -2
L6:
.dbline 0 ; func end
ret
.dbend
; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -