📄 configdai.asm
字号:
#include <sru.h>
#include <def21369.h>
#include "SPI.h"
// This function will setup the SRU Registers
.section /pm seg_pmco ;
.global InitSRU ;
.global InitSRU1 ;
InitSRU :
// Enable pull-up resistors on unused DPI pins
r0 = 0x2f1f;
// r0 = 0x2fff;
dm(DPI_PIN_PULLUP) = r0;
//Generating Code for connecting : DPI_PIN13 to SPI_MISO
SRU (LOW, DPI_PBEN13_I);
SRU (DPI_PB13_O, SPI_MISO_I);
//Generating Code for connecting : SPI_CLK to DPI_PIN6
SRU (HIGH, DPI_PBEN06_I);
#ifdef SET_CLKPL
SRU (SPI_CLK_PBEN_O, DPI_PBEN06_I);
#endif
#ifdef SET_CPHASE_CLKPL
SRU (SPI_CLK_PBEN_O, DPI_PBEN06_I);
#endif
SRU (SPI_CLK_O, DPI_PB06_I);
//Generating Code for connecting : SPI_MOSI to DPI_PIN7
SRU (HIGH, DPI_PBEN07_I);
SRU (SPI_MOSI_O, DPI_PB07_I);
//Generating Code for connecting : SPI_FLG0 to DPI_PIN8
SRU (HIGH, DPI_PBEN08_I);
SRU (SPI_FLG0_O, DPI_PB08_I);
// Return back from the subroutine
InitSRU.end: rts;
InitSRU1 :
// Enable pull-up resistors on unused DAI pins
r0 = 0xf3fff;
dm(DAI_PIN_PULLUP) = r0;
//Generating Code for connecting : LOW to DAI_PIN15
SRU (HIGH, PBEN15_I);
SRU (LOW, DAI_PB15_I);
//Generating Code for connecting : LOW to DAI_PIN16
SRU (HIGH, PBEN16_I);
SRU (LOW, DAI_PB16_I);
// Return back from the subroutine
rts;
InitSRU1.end:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -