?? f2407adc.h
字號:
/* ==================================================================================
File name: F2407ADC.H
Originator: Digital Control Systems Group
Texas Instruments
Description:
This file defines handy constants for object initializations and
contains prototypes for the functions inF2407ADC1.ASM andF2407ADC2.ASM
and has definitions of structs etc.
=====================================================================================
History:
-------------------------------------------------------------------------------------
9-15-2000 Release Rev 1.0
---------------------------------------------------------------------------------- */
#ifndef __F2407_ADC_H__
#define __F2407_ADC_H__
#include "..\include\F2407BMSK.H"
#ifndef NULL
#define NULL 0
#endif
/*-----------------------------------------------------------------------------
Define the structure of the ADCGEN
-----------------------------------------------------------------------------*/
typedef struct {
int c1_gain; /* Gain control for channel 1[Q13] */
int c2_gain; /* Gain control for channel 2[Q13] */
int c3_gain; /* Gain control for channel 3[Q13] */
int c4_gain; /* Gain control for channel 4[Q13] */
int c1_out; /* Conversion result for channel 1[Q15]*/
int c2_out; /* Conversion result for channel 2[Q15]*/
int c3_out; /* Conversion result for channel 3[Q15]*/
int c4_out; /* Conversion result for channel 4[Q15]*/
int a4_ch_sel; /* ADC channel select variable[Q0] */
int (*init)(); /* Initialization func pointer */
int (*update)(); /* Update function */
} ADCVALS;
/*-----------------------------------------------------------------------------
Define a ADCVALS_handle
-----------------------------------------------------------------------------*/
typedef ADCVALS *ADCVALS_handle;
/*------------------------------------------------------------------------------
Default Initializers for the F2407 ADCVALS Object
------------------------------------------------------------------------------*/
#define F2407_ADC_DEFAULTS { 0x1fff, \
0x1fff, \
0x1fff, \
0x1fff, \
0x0, \
0x0, \
0x0, \
0x0, \
0x3210, \
(int (*)(int))F2407_ADC_Init, \
(int (*)(int))F2407_ADC_Update \
}
#define ADC_DEFAULTS F2407_ADC_DEFAULTS
#define CALIBRATION_CONSTANT 0
#define ADCTRL1_INIT_STATE ADC_SOFT_STOP_FLAG + ADC_SEQ_CASC + \
ADC_ACQ_PS_2 + ADC_CPS_1
#define ADCTRL2_INIT_STATE ADC_INT_FLAG_SEQ1 + ADC_SOC_SEQ1 + \
ADC_INT_FLAG_SEQ2
/*----------------------------------------------------------------------------
Function prototypes
----------------------------------------------------------------------------*/
void F2407_ADC_Init(ADCVALS_handle);
void F2407_ADC_Update(ADCVALS_handle);
#endif /*__F2407_ADC_H__ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -