sd_eeprom.s
来自「Atmega64单片机程序(完整工程)」· S 代码 · 共 58 行
S
58 行
.module SD_EEPROM.c
.area text(rom, con, rel)
.even
_Load_SD_BootSector::
sbiw R28,2
; /*--------------File Info-------------------------------------------------------
; ** 文 件 名: SD_EEPROM.c
; ** 最后修改日期: 2008.04.04
; ** 版 本: V1.0
; ** 描 述:
; **------------------------------------------------------------------------------
; ** Created by:
; ** Created date:
; *******************************************************************************/
; #include "SYS_Config.h"
; #include "SD_Config.h"
; #include "SD_EEPROM.h"
;
; extern INT8U Data_Buf[SD_BLOCKSIZE];
;
; void Load_SD_BootSector(void)
; {
; EEPROMReadBytes(SD_BootSectorAddress,Data_Buf,SD_BootSectorLength);
ldi R24,512
ldi R25,2
std y+1,R25
std y+0,R24
ldi R18,<_Data_Buf
ldi R19,>_Data_Buf
ldi R16,64
ldi R17,0
xcall _EEPROMReadBytes
L1:
adiw R28,2
.dbline 0 ; func end
ret
.even
_Save_SD_BootSector::
sbiw R28,2
; }
;
; void Save_SD_BootSector(void)
; {
; EEPROMWriteBytes(SD_BootSectorAddress,Data_Buf,SD_BootSectorLength);
ldi R24,512
ldi R25,2
std y+1,R25
std y+0,R24
ldi R18,<_Data_Buf
ldi R19,>_Data_Buf
ldi R16,64
ldi R17,0
xcall _EEPROMWriteBytes
L2:
adiw R28,2
.dbline 0 ; func end
ret
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?