Go to the source code of this file.
Data Structures | |
struct | EEPAGE |
struct | user_data_type |
Defines | |
#define | VREF 2.50f |
#define | ADT7486A_ADDR0 0x4C |
#define | NCHANNEL_ADT7486A 1 |
#define | SST_LINE1 1 |
#define | CLEAR 0 |
#define | SET 1 |
#define | DONE 1 |
#define | FAILED 0 |
#define | ON 1 |
#define | OFF 0 |
#define | IntGAIN1 0 |
#define | IntGAIN2 1 |
#define | IntGAIN4 2 |
#define | IntGAIN8 3 |
#define | IntGAIN16 4 |
#define | SERIALN_LENGTH 4 |
#define | SERIALN_ADD (PageAddr[3]) |
#define | PAGE_SIZE (unsigned int) sizeof(eepage) |
#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 | EEP_RW_IDX 0x0a |
#define | IDXDAC 21 |
#define | IDXCTL 2 |
#define | IDXEEP_CTL 48 |
#define | IDXDELAY 6 |
#define | UCTEMPERATURE_MASK 0x0080 |
#define | BTEMPERATURE_MASK 0x0600 |
#define | VOLTAGE_MASK 0x0005 |
#define | CURRENT_MASK 0x0008 |
#define | MAIN_CURRENT_MASK 0x8000 |
#define | humsense 1 |
Functions | |
float | read_voltage (unsigned char channel, unsigned int *rvalue, unsigned char gain) |
Variables | |
float code | coeff [8] = {4.615, 3.136, 0.1, 3.136, 0.4, 0.4, 0.2, 0.01} |
float code | offset [8] = { 0, 0, 0, 0, 0, 0, 0, 0} |
unsigned int xdata | ltc2620mirror [16] |
unsigned int xdata | PageAddr [] = {0x000, 0x200, 0x400, 0x600} |
struct EEPAGE xdata | eepage |
struct user_data_type xdata | user_data |
unsigned char bdata | rCTL |
sbit | CPup = rCTL ^ 0 |
sbit | Cmode = 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 | S6dd = rCSR ^ 1 |
sbit | Smode = rCSR ^ 3 |
sbit | SeeS = rCSR ^ 4 |
sbit | SeeR = rCSR ^ 5 |
sbit | SsS = rCSR ^ 6 |
sbit | SmSd = rCSR ^ 7 |
unsigned int bdata | rESR |
sbit | Vss = rESR ^ 8 |
sbit | Iss = rESR ^ 9 |
sbit | Vdd = rESR ^ 10 |
sbit | Idd = rESR ^ 11 |
sbit | I5 = rESR ^ 12 |
sbit | I33 = rESR ^ 13 |
sbit | I18 = rESR ^ 14 |
sbit | uCT = rESR ^ 15 |
sbit | IntssTT = rESR ^ 0 |
sbit | Ext1ssTT = rESR ^ 1 |
sbit | Ext2ssTT = rESR ^ 2 |
sbit | EEPROM = rESR ^ 3 |
sbit | pcbssTT = rESR ^ 4 |
sbit | RdssT = rESR ^ 5 |
sbit | V6Fault = rESR ^ 7 |
sbit | VCC_EN = P1 ^ 3 |
sbit | VREG_5 = P2 ^ 5 |
sbit | VREG_3 = P2 ^ 6 |
sbit | V6ddFlag = P1 ^ 6 |
sbit | DELAY_0 = P0 ^ 6 |
sbit | DELAY_1 = P0 ^ 7 |
float read_voltage | ( | unsigned char | channel, | |
unsigned int * | rvalue, | |||
unsigned char | gain | |||
) |
float code coeff[8] = {4.615, 3.136, 0.1, 3.136, 0.4, 0.4, 0.2, 0.01} |
{ 0x00000000 , 0x0000, 0x0000 , 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 , 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 , 0.0, 3.5, 0.1, 5.5, 0.0, 0.0, 0.0, 0.0 , 6.0, 5.5, 0.3, 6.5, 1.8, 0.1, 0.5, 0.2 , 10., 50. , 10., 50. }
unsigned int xdata ltc2620mirror[16] |
struct user_data_type xdata user_data |