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

📄 t254x_fn.h

📁 SEED_TMS320vc5402dsk是在TI的TMS320VC5402DSK板基础上简化开发出来的
💻 H
字号:
/*{{TIDC_Wizard Auto Code Start                                 */
/****************************************************************/
/* don't change anything here until you know what you are doing!*/
/* the plug-in will change all text between the TIDC Wizard     */
/* Code marks without user intervention!                        */
/* TMS320C5402                                                  */
/*                                                              */
/****************************************************************/

/****************************************************************/
/* device driver generated by Data Converter Support plug-in    */
/* based on <C:\TI\PLUGINS\AAP_DEV\c5000\d254x_fn.h> */
/****************************************************************/
/****************************************************************/
/* TLV254x driver version 1.0 for C5400                         */
/* STUB driver for BETA release (no functions!)                 */
/****************************************************************/
#ifndef T254X_FN_H
#define T254x_FN_H


/* STRUCTURE DEFINITION FOR CONTROL REGISTER 0                  */
/****************************************************************/                                                      
typedef union
{
   unsigned int value;
   struct
      {
          unsigned int trig               :2;
          unsigned int eoc                :1;
          unsigned int sweep              :2;
          unsigned int mode               :2;
          unsigned int src                :2;
          unsigned int period             :1;
          unsigned int refvolt            :1;
          unsigned int ref                :1;
          unsigned int reserved           :4;
      } control_bit;
} TLV254xCREG;                                                

/****************************************************************/
/* data converter structure definitions                         */
/****************************************************************/
typedef struct
{
    unsigned int       port;    /* number of seriel port */
    unsigned int       command;
    TLV254xCREG        creg;
} DEV_254X;

/****************************************************************/
/* define external DC address pointer(s)                        */
/****************************************************************/
extern DEV_254X Tlv2544_1;

/****************************************************************/
/* TLV254x MACORS FOR BIT FIELD DEFINITIONS                     */
/****************************************************************/
/* TLV254x macros for control registers integer assignments     */
/* of the control register 1                                    */
/****************************************************************/ 

#define TLV254X_TRIG0           (0x1)
#define TLV254X_TRIG1           (0x2)
#define TLV254X_EOC             (0x4)
#define TLV254X_SWEEP0          (0x8)
#define TLV254X_SWEEP1          (0x10)
#define TLV254X_MODE0           (0x20)
#define TLV254X_MODE1           (0x40)
#define TLV254X_SRC0            (0x80)
#define TLV254X_SRC1            (0x100)
#define TLV254X_PERIOD          (0x200)
#define TLV254X_REFVOLT         (0x400)
#define TLV254X_REF             (0x800)

/****************************************************************/
/* TLV254x macros for Command Set                               */
/* see datasheet for examples                                   */
/****************************************************************/ 
#define TLV2544_INP0	(0x0)			// 2544 chan 0
#define TLV2544_INP1	(0x2000)		// 2544 chan 1
#define TLV2544_INP2	(0x4000)		// 2544 chan 2
#define TLV2544_INP3	(0x6000)		// 2544 chan 3
#define TLV2548_INP0	(0x0)			// 2548 chan 0
#define TLV2548_INP1	(0x1000)		// 2548 chan 1
#define TLV2548_INP2	(0x2000)		// 2548 chan 2
#define TLV2548_INP3	(0x3000)		// 2548 chan 3
#define TLV2548_INP4	(0x4000)		// 2548 chan 4
#define TLV2548_INP5	(0x5000)		// 2548 chan 5
#define TLV2548_INP6	(0x6000)		// 2548 chan 6
#define TLV2548_INP7	(0x7000)		// 2548 chan 7
#define TLV254X_SWPD	(0x8000)		// software power down
#define TLV254X_RCFR	(0x9000)		// read CFR
#define TLV254X_WCFR	(0xA000)		// write CFR (or with data!)
#define TLV254X_REF2	(0xB000)		// select test (refp+refm)/2
#define TLV254X_REFM	(0xC000)		// select test refm
#define TLV254X_REFD	(0xD000)		// select test refp
#define TLV254X_FFRD	(0xE000)		// read FIFO
#define TLV254X_RESV	(0xF000)		// reserved?
/***************************************************************/ 
#endif /* T254X_FN_H */

/****************************************************************/
/* END OF t254x_fn.h                                             */
/****************************************************************/
/*TIDC_Wizard Auto Code End}}*/

⌨️ 快捷键说明

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