日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

c语言eallow,求大神指导C语言框图设计!!!

發(fā)布時(shí)間:2024/1/8 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c语言eallow,求大神指导C语言框图设计!!! 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓

#include "DSP281x_Device.h"

#include "DSP281x_Examples.h"

#define POST_SHIFT 0

#define INLINE_SHIFT 1

#define NO_SHIFT 0

// ADC start parameters

#define ADC_MODCLK 0x3

#define ADC_CKPS 0x0

#define ADC_SHCLK 0x1

#define AVG 1000

#define ZOFFSET 0x00

#define BUF_SIZE 1024

Uint16 SampleTable[BUF_SIZE];

main()

{

Uint16 i;

Uint16 array_index;

SysCtrlRegs.HISPCP.all = ADC_MODCLK;

EDIS;

EALLOW;

GpioMuxRegs.GPFMUX.bit.XF_GPIOF14 = 1;

EDIS;

IER = 0x0000;

IFR = 0x0000;

Interrupt

InitPieVectTable();

InitAdc();

AdcRegs.ADCTRL1.bit.ACQ_PS = ADC_SHCLK;

AdcRegs.ADCTRL3.bit.ADCCLKPS = ADC_CKPS;

AdcRegs.ADCTRL1.bit.SEQ_CASC = 1;

AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x0;

AdcRegs.ADCTRL1.bit.CONT_RUN = 1;

AdcRegs.ADCTRL1.bit.SEQ_OVRD = 1;

AdcRegs.ADCCHSELSEQ1.all = 0x0;

AdcRegs.ADCCHSELSEQ2.all = 0x0;

AdcRegs.ADCCHSELSEQ3.all = 0x0;

AdcRegs.ADCCHSELSEQ4.all = 0x0;

AdcRegs.ADCMAXCONV.bit.MAX_CONV1 = 0x7;

for (i=0; i

{

SampleTable[i] = 0;

}

AdcRegs.ADCTRL2.all = 0x2000;

while(1)

array_index = 0;

for (i=0; i

{

while (AdcRegs.ADCST.bit.INT_SEQ1== 0){}

asm(" setc XF ");

AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;

#if INLINE_SHIFT

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT0)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT1)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT2)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT3)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT4)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT5)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT6)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT7)>>4);

#endif

#if NO_SHIFT || POST_SHIFT

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT0));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT1));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT2));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT3));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT4));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT5));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT6));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT7));

#endif //-- NO_SHIFT || POST_SHIFT

while (AdcRegs.ADCST.bit.INT_SEQ1== 0){}

asm(" clrc XF ");

AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;

#if INLINE_SHIFT

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT8)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT9)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT10)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT11)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT12)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT13)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT14)>>4);

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT15)>>4); #endi

#if NO_SHIFT || POST_SHIFT

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT8));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT9));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT10));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT11));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT12));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT13));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT14));

SampleTable[array_index++]= ( (AdcRegs.ADCRESULT15));

#endif

#if POST_SHIFT

for (i=0; i

{

SampleTable[i] = ((SampleTable[i]) >>4);

}

#endif // -- POST_SHIFT

asm(" clrc XF ");

}

}

總結(jié)

以上是生活随笔為你收集整理的c语言eallow,求大神指导C语言框图设计!!!的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。