dsk2812_da.h

来自「example for DSP2812, created by SEED」· C头文件 代码 · 共 62 行

H
62
字号

/* 使用DAC7625的0通道 */
#define DAC7625_0_ENABLE	1						/* 1:编译 0:不编译 */

/* 使用DAC7625的1通道 */
#define DAC7625_1_ENABLE	1						/* 1:编译 0:不编译 */

/* 使用DAC7625的2通道 */
#define DAC7625_2_ENABLE	1						/* 1:编译 0:不编译 */

/* 使用DAC7625的3通道 */
#define DAC7625_3_ENABLE	1						/* 1:编译 0:不编译 */

#ifndef _register
#define _register   

unsigned int * DA_PORT0 = (unsigned int *) 0x4000;
unsigned int * DA_PORT1 = (unsigned int *) 0x4001;
unsigned int * DA_PORT2 = (unsigned int *) 0x4002;
unsigned int * DA_PORT3 = (unsigned int *) 0x4003;

#endif

#ifndef _da_var
#define _da_var

#define DA_TIMER_NUM	40000			/* 1s/25us*/
#define DA_SETVALUE	2500			/* 2500mv */

int da_rand;
int da_temp_value;
int da_zhiliu_value[17];
int da_channel;
int da_kind[17];
int data_time[17];
int timer_sum[17];
int fangbo_flag[17];
int channel_flag[17] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};     
unsigned int timer_count;

float angle;					/* 角度 */
float angle_diff;				/* 角差 */
float da_value;					/* 幅值 */
float da_value_low[17];
float da_value_high[17];

#ifdef DAC7625_0_ENABLE
unsigned int coefficient1[1000];				/* DAC7625的0通道系数表 */
#endif
#ifdef DAC7625_1_ENABLE
int coefficient2[1000];				/* DAC7625的1通道系数表 */
#endif
#ifdef DAC7625_2_ENABLE
int coefficient3[1000];				/* DAC7625的2通道系数表 */
#endif
#ifdef DAC7625_3_ENABLE
int coefficient4[1000];				/* DAC7625的3通道系数表 */
#endif


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?