📄 sport0_isr.c
字号:
#include <sys\exception.h>
#include <cdefBF561.h>
#include "..\include\ad1836.h"
#include "..\include\TDMchannels.h"
// SPORT0 DMA transmit buffer for data transfer
volatile int iDMATxBuffer[8];
// SPORT0 DMA receive buffer for data transfer
volatile int iDMARxBuffer[8];
// Flag to indicate that a new sample has been read by the SPORT0 ISR
char cNewSample = 0;
//--------------------------------------------------------------------------//
// Function: Sport0_RX_ISR //
// //
// Description: This ISR is executed after a complete frame of input data //
// has been received. The new samples are stored in //
// iADCnC. The processed values are copied from the //
// variables iDACnV into the dma //
// transmit buffer. //
//--------------------------------------------------------------------------//
EX_INTERRUPT_HANDLER(Sport0_RX_ISR)
{
// confirm interrupt handling
*pDMA2_0_IRQ_STATUS = 0x0001;
// copy input data from dma input buffer into variables for global access
iADC1L = iDMARxBuffer[INTERNAL_ADC_L0];
iADC1R = iDMARxBuffer[INTERNAL_ADC_R0];
iADC2L = iDMARxBuffer[INTERNAL_ADC_L1];
iADC2R = iDMARxBuffer[INTERNAL_ADC_R1];
// copy processed data from variables for global access into dma output buffer
iDMATxBuffer[INTERNAL_DAC_L0] = iDAC1L;
iDMATxBuffer[INTERNAL_DAC_R0] = iDAC1R;
iDMATxBuffer[INTERNAL_DAC_L1] = iDAC2L;
iDMATxBuffer[INTERNAL_DAC_R1] = iDAC2R;
iDMATxBuffer[INTERNAL_DAC_L2] = iDAC3L;
iDMATxBuffer[INTERNAL_DAC_R2] = iDAC3R;
cNewSample = 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -