📄 cx24143_regs.h
字号:
/* cobra_regs.h */
/****************************************************************************
* Conexant QPSK driver (internal mode) *
* Copyright ? Shenzhen Coship Electronics Co.,LTD. *
* All rights reserved. *
* Author: Sunfugong *
* Create Date: 2005/7/20 *
* Update: 2005/8/01 Sunfugong *
*****************************************************************************/
#ifndef COBRA_REGS_H_DEFINED
#define COBRA_REGS_H_DEFINED
/*******************************************************************************************************/
/* Include Cobra internal */
/*******************************************************************************************************/
//#include "cx24108_gbls.h" /* Cobra Globals */
#ifdef __cplusplus
extern "C" {
#else
#endif /* __cplusplus */
/*******************************************************************************************************/
/* Register-specific Enums */
/*******************************************************************************************************/
enum RegDataType{ /* all possible types of register data must be defined */
REGT_BIT=1, /* bit (most common type) */
REGT_BYTE, /* byte-wide register */
REGT_MINT, /* int with n-bit msb in first register, remaining bits in next reg(s) */
REGT_INT, /* int type */
REGT_UINT, /* unsigned int register type */
REGT_LONG, /* standard long */
REGT_ULONG, /* unsigned long */
REGT_INVBIT, /* inverted bool (TRUE means FALSE -> ask the hardware guys!) */
REGT_BITHL, /* special-purpose: bit is set high, then immediatly set low */
REGT_NULL, /* byte-wide register */
REGT_EOLIST=0 /* end-of-list indicator */
};
/*******************************************************************************************************/
/* REGRW */
/*******************************************************************************************************/
enum RegRW{ /* register access controls */
REG_RW=1, /* register has full read/write capabilities */
REG_RO=2, /* register is read-only */
REG_WO=3, /* register is write-only */
REG_UNUSED=0 /* register is unused (also EOL indicator) */
};
/*******************************************************************************************************/
/* REGFILTER (upgraded to Camaric) */
/*******************************************************************************************************/
#define REGF DWORD
typedef enum RegFilter{
REGF_COBRA=0x01, /* register item is part of Cobra-class */
REGF_CAM_DEF=0x02, /* register is used within camaric-only default settings */
REGF_CAM_EXT=0x04, /* Register is an extended register (to acomodate Camaric) */
REGF_CAM_ONLY=0x08, /* Register is a Camaric-only register */
REGF_CAM_RED=0x10, /* Register is reduced to accomodate Camaric (none id'd yet) */
REGF_ZEROB6=0x80, /* zero bit 6 before write (accomodate register 0x29) */
REGF_NONE=0 /* no particular filter attached to a register item */
}_REGF;
/*******************************************************************************************************/
/* REGISTER Struct */
/*******************************************************************************************************/
typedef struct /* REGISTER. This struct will be used to control access to */
{ /* register mapped items in the various demods */
CHAR *regname; /* asciz name of register */
REGIDX reg_idx; /* register simplification ID */
UCHAR addr; /* address from register map (hex) */
UCHAR starting; /* starting pt. of bits in addr */
UCHAR bit_count; /* length of reg item in bits */
enum RegRW regRW; /* Indicates if register HW can be read/written */
REGF regfilter; /* Additional layer of filterization */
enum RegDataType regtype; /* type of data held in register(s): */
/* ... BIT, COMP2, COMP1, FLOAT, UINT, INT ,....*/
ULONG default_value; /* holds default value (for reset) to write to the register */
CHAR *hwmask; /* holds hardware mask string -- 1st byte of mask is first reg addr */
}REGISTER;
/*******************************************************************************************************/
/* external reference to Register array in Cobra_reg.c */
/*******************************************************************************************************/
extern const REGISTER Register[];
/*******************************************************************************************************/
/* Register-specific test functions */
/*******************************************************************************************************/
CHAR *test_regname(const CHAR *regname);
CHAR *test_regidx(const CHAR *regname);
CHAR *test_regrw(int regrw);
CHAR *test_regfilt(int regfilt);
CHAR *test_regtype(int regtype);
CHAR *test_regshad(int regtype);
/*******************************************************************************************************/
/*******************************************************************************************************/
/*******************************************************************************************************/
#ifdef __cplusplus
}
#endif
#endif /* #ifndef COBRA_REGS_H_DEFINED */
/* CR 9509 : Add an extra newline */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -