⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 esl_external_read_data.asm

📁 This an assembly example for multi scanning key from 8x8 matrix. ELAN eAM eDSP
💻 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 + -