⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsp281x_adc04u.h

📁 程序是我用DSP2812开发的无刷直流电机控制程序
💻 H
字号:
/* ==================================================================================
File name:       DSP281x_ADC04U.H
                    
Originator:	Digital Control Systems Group
			Texas Instruments

Description: This header file contains source for the F281X general purpose 
4 conversions ADC driver for unipolar signals

Target: TMS320F281x family

=====================================================================================
History:
-------------------------------------------------------------------------------------
 04-15-2005	Version 3.20: Using DSP281x v. 1.00 or higher 
----------------------------------------------------------------------------------*/

#ifndef __DSP281X_ADC04U_H__
#define __DSP281X_ADC04U_H__

#include "DSP281x_BMSK.h"

/*-----------------------------------------------------------------------------
Define the structure of the ADCVALS Object
-----------------------------------------------------------------------------*/
typedef struct { int16 Ch1Gain;        // Parameter: Gain for channel 1 (Q13) 
                 int16 Ch1Out;         // Output: Channel 1 output (Q15) 
                 int16 Ch2Gain;        // Parameter: Gain for channel 2 (Q13) 
                 int16 Ch2Out;         // Output: Channel 2 output (Q15) 
                 int16 Ch3Gain;        // Parameter: Gain for channel 3 (Q13) 
                 int16 Ch3Out;         // Output: Channel 3 output (Q15) 
                 int16 Ch4Gain;        // Parameter: Gain for channel 4 (Q13)
                 int16 Ch4Out;         // Output: Channel 4 output (Q15)
                 Uint16 ChSelect;      // Parameter: ADC channel selection
                 void (*init)();       // Pointer to the init function 
                 void (*read)();       // Pointer to the read function 
               } ADCVALS;

typedef ADCVALS *ADCVALS_handle;
/*-----------------------------------------------------------------------------
 Note 1 : It is necessary to call the init function to change the ADC 
            register settings, for the change in the channel setting for 
            Ch_sel setting changes to take effect.
            The read function will not detect or act upon this change.
-----------------------------------------------------------------------------*/
// Default Initializer for the ADCVALS Object

#define F281X_ADC04U_DEFAULTS { 0x1FFF,0x0000,             \
                                0x1FFF,0x0000,             \
                                0x1FFF,0x0000,             \
                                0x1FFF,0x0000,             \
                                0x6543,                    \
                              (void (*)(Uint32))F281X_adc04u_drv_init, \
                              (void (*)(Uint32))F281X_adc04u_drv_read  \
                             }

#define ADCVALS_DEFAULTS F281X_ADC04U_DEFAULTS 

#define ADCTRL1_INIT_STATE_UNIPOLAR  ADC_SUS_MODE0 + ADC_ACQ_PS_2 + \
                                     ADC_CPS_1 + ADC_SEQ_CASC

#define ADCTRL2_INIT_STATE_UNIPOLAR  ADC_EVA_SOC_SEQ1 

/*------------------------------------------------------------------------------
 Prototypes for the functions in F281XADC04U.C
------------------------------------------------------------------------------*/
void F281X_adc04u_drv_init(ADCVALS *);
void F281X_adc04u_drv_read(ADCVALS *);

#endif // __DSP281X_ADC04U_H__ 

⌨️ 快捷键说明

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