📄 initsru.asm
字号:
/***************************************************************************************************
**
** File: initSRU.asm
** Date: 7/29/05
** Use: ADSP-21369 EZkit. The program initializes and sets the SRU & DAI/DPI pins
**
*****************************************************************************************************/
#include <def21369.h>
// The following definition allows the SRU macro to check for errors. Once the routings have
// been verified, this definition can be removed to save some program memory space.
// The preprocessor will issue a warning stating this when using the SRU macro without this
// definition
#define SRUDEBUG // Check SRU Routings for errors.
#include <SRU.h>
.section /pm seg_pmco;
.global _initSRU;
_initSRU:
// Disable the pull-up resistors on all 20 pins
r0 = 0x000FFFFF;
dm(DAI_PIN_PULLUP) = r0;
//--------------------------------------------------------------------------
// Route SPI signals to SPI FLASH.
SRU(SPI_MOSI_O,DPI_PB01_I) //Connect MOSI to DPI PB1.
SRU(DPI_PB02_O, SPI_MISO_I) //Connect DPI PB2 to MISO.
SRU(SPI_CLK_O, DPI_PB03_I) //Connect SPI CLK to DPI PB3.
SRU(SPI_FLG0_O, DPI_PB05_I) //Connect SPI FLAG3 to DPI PB5.
//---------------------------------------------------------------------------
// Tie pin buffer enable from SPI peipherals to determine whether they are
// inputs or outputs
SRU(SPI_MOSI_PBEN_O, DPI_PBEN01_I);
SRU(SPI_MISO_PBEN_O, DPI_PBEN02_I);
SRU(SPI_CLK_PBEN_O, DPI_PBEN03_I);
SRU(SPI_FLG0_PBEN_O, DPI_PBEN05_I);
//-----------------------------------------------------------------------------
_initSRU.end:
rts;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -