?? esl_external_read_data.asm
字號:
.IFNDEF @_LIB_EXTERNAL_READ_DATA_ASM
@_LIB_EXTERNAL_READ_DATA_ASM .EQU 1
.CODE
;*****************************************************************************************
; SUBROUTINE: EXTERNAL_READ_WORD
; DESCRIPTION: Read one word data from external memory(Mode: Byte Mode).
; SPI FLASH is the default external memory type.
;
; If user wants to use other type of external memory,
; the subroutine of manipulating external memory remains to be designed by user for their specific applications,
; and user needs to replace the following code with designed code
; .IF (@__LIB_ENABLEPERIPHERAL == 1)
; CALL @_LIB_F_SPI_RX_2BYTE
; .ENDIF
;
; The external memory read subroutine must follow four rules:
; 1. The input address will be stored in R1(high address) and R0(low address) by speech decoder,
; so external memory subroutine must get address from R1 and R0.
; 2. The external memory must be set as byte mode.
; 3. In external memory subroutine, two consecutive bytes must be combined as one word.
; 4. The output data(word) of external memory subroutine must be put in R0.
;
;*****************************************************************************************
.EXTERN @_LIB_F_SPI_RX_2BYTE
.GLOBAL S1_EXTERNAL_READ_WORD
S1_EXTERNAL_READ_WORD:
;********************************
;user can program code from here
;********************************
;CALL @_LIB_F_SPI_RX_2BYTE
RET
.GLOBAL S2_EXTERNAL_READ_WORD
S2_EXTERNAL_READ_WORD:
;********************************
;user can program code from here
;********************************
;CALL @_LIB_F_SPI_RX_2BYTE
RET
.GLOBAL M_EXTERNAL_READ_WORD
M_EXTERNAL_READ_WORD:
;********************************
;user can program code from here
;********************************
;CALL @_LIB_F_SPI_RX_2BYTE
RET
;*****************************************************************************************
; SUBROUTINE: EXTERNAL_WRITE_WORD
; DESCRIPTION: write one block of RAM to external memory(Mode: Byte Mode).
; SPI FLASH is the default external memory type.
;
; If user wants to use other type of external memory,
; the subroutine of manipulating external memory remains to be designed by user for their specific applications,
; and user needs to replace the following code with designed code
; .IF (@__LIB_ENABLEPERIPHERAL == 1)
; CALL @_LIB_F_SPI_PPGM_WORD
; .ENDIF
;
; The external memory read subroutine must follow five rules:
; R3 = #RAM_ADD (the start address of RAM)
; R2 = #SIZE (the size of RAM)
; R1 = #(SPI_ADD / 65536) (the high word of address of external memory)
; R0 = #(SPI_ADD % 65536) (the low word of address of external memory)
;After writing, the new start address must be updated and stored in R1(high word of address) R0(low word of ddress)
;*****************************************************************************************
.EXTERN @_LIB_F_SPI_PPGM_WORD
.GLOBAL EXTERNAL_WRITE_WORD
EXTERNAL_WRITE_WORD:
;********************************
;user can program code from here
;********************************
;CALL @_LIB_F_SPI_PPGM_WORD
RET
Mapping_Nand_Add:
//CALL Mapping_Nand_Add_Check
RET
.ENDIF ;@_LIB_EXTERNAL_READ_DATA_ASM
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -