main.c
来自「Interfacing AD7276 High-Speed Data Conve」· C语言 代码 · 共 33 行
C
33 行
#include <cdefBF535.h>
#include <defBF535.h>
#include <signal.h>
int READ_DATA_ADC;
void sport0_isr(int i);
void main(void)
{
//Interrupt set up for the SPORT0
interrupt(SIGIVG8, sport0_isr);
*pSIC_IMASK = SIC_MASK_ALL;
//SPORT0 configuration
*pSPORT0_RSCLKDIV = 0x100;//Determines the SCLK frequency and hence the data bit rate
*pSPORT0_RFSDIV = 0xe;
//*pSPORT0_RX_CONFIG = RSPEN | ICLK | DTYPE1 | SLEN14 | IRFS | RFSR ;
*pSPORT0_RX_CONFIG = 0x07A3;
while(1)
{
//wait for SPORT receive interrupts
}
}
void sport0_isr(int i)
{
READ_DATA_ADC = *pSPORT0_RX;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?