Go to the source code of this file.
Data Structures | |
struct | ADC2MSCB_TABLE |
struct | IADC_TABLE |
struct | EEPAGE |
struct | user_data_type |
Defines | |
#define | ADT7486A_ADDR0 0x49 |
#define | ADT7486A_ADDR1 0x48 |
#define | ADT7486A_ADDR2 0x4B |
#define | ADT7486A_ADDR3 0x4A |
#define | ADT7486A_ADDR4 0x48 |
#define | SST_LINE1 1 |
#define | SST_LINE2 2 |
#define | SST_TIME 2 |
#define | BIAS_OUTPUT_ENABLE ADDR_PCA9539, PCA9539_CONFIG0, PCA9539_ALL_OUTPUT |
#define | BIAS_DISABLE ADDR_PCA9539, PCA9539_OUTPUT0, 0xFF |
#define | BIAS_ENABLE ADDR_PCA9539, PCA9539_OUTPUT0, 0x00 |
#define | BIAS_READ ADDR_PCA9539, PCA9539_INPUT0 |
#define | BIAS_WRITE ADDR_PCA9539, PCA9539_OUTPUT0 |
#define | BACKPLANE_INPUT_ENABLE ADDR_PCA9539, PCA9539_CONFIG1, PCA9539_ALL_INPUT |
#define | BACKPLANE_READ ADDR_PCA9539, PCA9539_INPUT1 |
#define | N_RB_CHANNEL 16 |
#define | EXT_VREF 1.25f |
#define | CURR_MEASURE 0x04 |
#define | V_A2MTABLE 0 |
#define | I_A2MTABLE 1 |
#define | VOLT_MEASURE 0x04 |
#define | GAIN1 0 |
#define | GAIN4 1 |
#define | GAIN8 2 |
#define | GAIN16 3 |
#define | GAIN32 4 |
#define | GAIN64 5 |
#define | CONVER_FAC2 65536.0f |
#define | CONVER_FAC1 0xFFFFFFFF |
#define | Q_PUMP_INIT 1 |
#define | Q_PUMP_OFF 2 |
#define | Q_PUMP_ON 3 |
#define | INT_VREF 2.44f |
#define | IntGAIN1 0 |
#define | IntGAIN2 1 |
#define | IntGAIN4 2 |
#define | IntGAIN8 3 |
#define | IntGAIN16 4 |
#define | EEP_CTRL_KEY 0x3C000000 |
#define | EEP_CTRL_READ 0x00110000 |
#define | EEP_CTRL_WRITE 0x00220000 |
#define | EEP_CTRL_INVAL_REQ 0xff000000 |
#define | EEP_CTRL_INVAL_KEY 0x00ff0000 |
#define | EEP_CTRL_OFF_RANGE 0x0000ff00 |
#define | PAGE_SIZE sizeof(eepage) |
#define | EEP_RW_IDX 0x06 |
#define | EEP_RW_LAST_IDX PAGE_SIZE/4 |
#define | NCHANNEL_BIAS 64 |
#define | NCHANNEL_ASUM 8 |
#define | NCHANNEL_SST 8 |
#define | NCHANNEL_ADT7486A 4 |
#define | IDXEER 1 |
#define | IDXCTL 2 |
#define | IDXQVOLT 6 |
#define | IDXBSWITCH 5 |
#define | IDXASUM 47 |
#define | IDXSST 19 |
#define | IDXBIAS 55 |
#define | IDXEEP_CTL 144 |
#define | IDXASUM_CTL 145 |
#define | SERIALN_LENGTH (unsigned int) 4 |
#define | SERIALN_ADD (unsigned int) (0x600) |
#define | FIRST_BIAS IDXBIAS |
#define | LAST_BIAS FIRST_BIAS + NCHANNEL_BIAS |
#define | FIRST_ASUM IDXASUM |
#define | LAST_ASUM FIRST_ASUM + NCHANNEL_ASUM |
#define | ADDR_LTC1669 0x20 |
#define | ADDR_PCA9539 0x74 |
#define | ADDR_LTC2497 0x14 |
#define | ADDR_LTC2495 0x14 |
#define | ON 1 |
#define | DONE 1 |
#define | OFF 0 |
#define | FAILED 0 |
#define | CLEAR 0 |
#define | UCTEMPERATURE_MASK 0x0100 |
#define | BTEMPERATURE_MASK 0x1000 |
#define | FGDTEMPERATURE_MASK 0x0400 |
#define | VOLTAGE_MASK 0x001C |
#define | CURRENT_MASK 0x0040 |
Functions | |
void | user_init (unsigned char init) |
void | user_loop (void) |
void | user_write (unsigned char index) reentrant |
unsigned char | user_read (unsigned char index) |
unsigned char | user_func (unsigned char *data_in, unsigned char *data_out) |
float | read_voltage (unsigned char channel, unsigned int *rvalue, float coeff, float offset, unsigned char gain) |
void | switchonoff (unsigned char command) |
int | eepageAddrConvert (unsigned int index) |
Variables | |
struct ADC2MSCB_TABLE xdata | adc2mscb_table [16] |
struct IADC_TABLE xdata | iadc_table [8] |
unsigned char | rEER |
struct EEPAGE xdata | eepage |
struct EEPAGE xdata | eepage2 |
unsigned int xdata | PageAddr [] = {0x000, 0x200, 0x400, 0x600} |
unsigned char xdata | ltc1665mirror [64] |
unsigned int xdata | ltc2600mirror [8] |
unsigned char bdata | rCTL |
sbit | CPup = rCTL ^ 0 |
sbit | CAsum = rCTL ^ 2 |
sbit | Ccal = rCTL ^ 3 |
sbit | CeeS = rCTL ^ 4 |
sbit | CeeR = rCTL ^ 5 |
sbit | CeeClr = rCTL ^ 6 |
sbit | CmSd = rCTL ^ 7 |
unsigned char bdata | rCSR |
sbit | SPup = rCSR ^ 0 |
sbit | SqPump = rCSR ^ 1 |
sbit | SAsum = rCSR ^ 2 |
sbit | Scal = rCSR ^ 3 |
sbit | SeeS = rCSR ^ 4 |
sbit | SeeR = rCSR ^ 5 |
sbit | SsS = rCSR ^ 6 |
sbit | SmSd = rCSR ^ 7 |
unsigned int bdata | rESR |
sbit | vQpump = rESR ^ 8 |
sbit | iQpump = rESR ^ 9 |
sbit | vReg1 = rESR ^ 10 |
sbit | vReg2 = rESR ^ 11 |
sbit | vReg3 = rESR ^ 12 |
sbit | iReg1 = rESR ^ 13 |
sbit | iReg2 = rESR ^ 14 |
sbit | iReg3 = rESR ^ 15 |
sbit | uCT = rESR ^ 0 |
sbit | IntssTT = rESR ^ 1 |
sbit | ExtssTT = rESR ^ 2 |
sbit | EEPROM = rESR ^ 3 |
sbit | pcbssTT = rESR ^ 4 |
sbit | RdssT = rESR ^ 5 |
struct user_data_type xdata | user_data |
sbit | timing = P2 ^ 7 |
unsigned long xdata | smbdebug |
#define BACKPLANE_INPUT_ENABLE ADDR_PCA9539, PCA9539_CONFIG1, PCA9539_ALL_INPUT |
#define BIAS_OUTPUT_ENABLE ADDR_PCA9539, PCA9539_CONFIG0, PCA9539_ALL_OUTPUT |
int eepageAddrConvert | ( | unsigned int | index | ) |
float read_voltage | ( | unsigned char | channel, | |
unsigned int * | rvalue, | |||
float | coeff, | |||
float | offset, | |||
unsigned char | gain | |||
) |
unsigned char user_func | ( | unsigned char * | data_in, | |
unsigned char * | data_out | |||
) |
struct ADC2MSCB_TABLE xdata adc2mscb_table[16] |
{ {GAIN32, 1, I_A2MTABLE, 1000, 22}, {GAIN32, 3, I_A2MTABLE, 1000, 127} , {GAIN32, 5, I_A2MTABLE, 1000, 7176}, {GAIN32, 7, I_A2MTABLE, 1000, 1840} , {GAIN1 , 7, V_A2MTABLE, 101.1, 230}, {GAIN1 , 5, V_A2MTABLE, 101.1, 230} , {GAIN1 , 3, V_A2MTABLE, 101.1, 230}, {GAIN1 , 1, V_A2MTABLE, 101.1, 230} , {GAIN32, 0, I_A2MTABLE, 1000, 3178}, {GAIN32, 2, I_A2MTABLE, 1000, 1800} , {GAIN32, 4, I_A2MTABLE, 1000, 925}, {GAIN32, 6, I_A2MTABLE, 1000, 4895} , {GAIN1 , 6, V_A2MTABLE, 101.1, 24}, {GAIN1 , 4, V_A2MTABLE, 101.1, 230} , {GAIN1 , 2, V_A2MTABLE, 101.1, 225}, {GAIN1 , 0, V_A2MTABLE, 101.1, 230} }
struct IADC_TABLE xdata iadc_table[8] |
unsigned char xdata ltc1665mirror[64] |
unsigned int xdata ltc2600mirror[8] |
unsigned int xdata PageAddr[] = {0x000, 0x200, 0x400, 0x600} |
struct user_data_type xdata user_data |