/home/daqweb/fgddaq/c8051/lpb.c File Reference

#include <stdio.h>
#include <math.h>
#include <string.h>
#include "mscbemb.h"
#include "LPB.h"
#include "Devices/adc_internal.h"
#include "Protocols/LPB_SPI_handler.h"

Go to the source code of this file.

Functions

void publishCtlCsr (void)
void publishErr (bit errbit)
void publishAll ()
void PublishVariable (float xdata *pvarDest, float varSrce, bit errbit)
float read_voltage (unsigned char channel, unsigned int *rvalue, unsigned char gain)
void delay_Operation (void)
void switchonoff (unsigned char command)
void user_init (unsigned char init)
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)
void user_loop (void)

Variables

char code node_name [] = "LPB"
char idata svn_rev_code [] = "$Rev: 1189 $"
unsigned char idata _n_sub_addr = 1
unsigned char bdata bChange
sbit bCPupdoitNOW = bChange ^ 0
sbit bDacdoitNOW = bChange ^ 1
sbit LTC2620_Flag = bChange ^ 3
sbit EEP_CTR_Flag = bChange ^ 4
sbit DELAY_Flag = bChange ^ 5
sbit SPI_SCK = MSCB_SPI_SCK
sbit SPI_MOSI = MSCB_SPI_MOSI
sbit SPI_MISO = MSCB_SPI_MISO
sbit LPB_CSn = P0 ^ 4
sbit CPLDMode = P2 ^ 6
unsigned char channel
unsigned long xdata humidTime = 0
unsigned long xdata currentTime = 0
unsigned long xdata currentTime2 = 0
unsigned char lbyte
unsigned char hbyte
unsigned char xdata status
unsigned char xdata humicount
float xdata humidity
float xdata htemperature
unsigned int xdata rSHTtemp1
unsigned int xdata rSHThumi1
unsigned char xdata FCSorig1
unsigned char xdata FCSdevi1
float *xdata eep_address
unsigned char tcounter
unsigned char xdata eeprom_flag = CLEAR
unsigned char xdata eeprom_wstatus
unsigned char xdata eeprom_rstatus
unsigned int xdata eeptemp_addr
unsigned char xdata * eeptemp_source
unsigned char xdata eep_request
MSCB_INFO_VAR code vars []
MSCB_INFO_VAR * variables = vars
SYS_INFO sys_info

Function Documentation

void delay_Operation ( void   ) 

Definition at line 224 of file lpb.c.

void publishAll (  ) 

Definition at line 180 of file lpb.c.

void publishCtlCsr ( void   ) 

Definition at line 162 of file lpb.c.

void publishErr ( bit  errbit  ) 

Definition at line 171 of file lpb.c.

void PublishVariable ( float xdata *  pvarDest,
float  varSrce,
bit  errbit 
)

Definition at line 189 of file lpb.c.

float read_voltage ( unsigned char  channel,
unsigned int *  rvalue,
unsigned char  gain 
)

Definition at line 198 of file lpb.c.

void switchonoff ( unsigned char  command  ) 

Definition at line 248 of file lpb.c.

unsigned char user_func ( unsigned char *  data_in,
unsigned char *  data_out 
)

Definition at line 511 of file lpb.c.

void user_init ( unsigned char  init  ) 

Definition at line 287 of file lpb.c.

void user_loop ( void   ) 

Definition at line 522 of file lpb.c.

unsigned char user_read ( unsigned char  index  ) 

Definition at line 504 of file lpb.c.

void user_write ( unsigned char  index  ) 

Definition at line 483 of file lpb.c.


Variable Documentation

unsigned char idata _n_sub_addr = 1

Definition at line 55 of file lpb.c.

unsigned char bdata bChange

Definition at line 59 of file lpb.c.

sbit bCPupdoitNOW = bChange ^ 0

Definition at line 62 of file lpb.c.

sbit bDacdoitNOW = bChange ^ 1

Definition at line 63 of file lpb.c.

unsigned char channel

Definition at line 77 of file lpb.c.

sbit CPLDMode = P2 ^ 6

Definition at line 75 of file lpb.c.

unsigned long xdata currentTime = 0

Definition at line 78 of file lpb.c.

unsigned long xdata currentTime2 = 0

Definition at line 78 of file lpb.c.

sbit DELAY_Flag = bChange ^ 5

Definition at line 68 of file lpb.c.

float* xdata eep_address

Definition at line 88 of file lpb.c.

sbit EEP_CTR_Flag = bChange ^ 4

Definition at line 67 of file lpb.c.

unsigned char xdata eep_request

Definition at line 94 of file lpb.c.

unsigned char xdata eeprom_flag = CLEAR

Definition at line 90 of file lpb.c.

unsigned char xdata eeprom_rstatus

Definition at line 91 of file lpb.c.

unsigned char xdata eeprom_wstatus

Definition at line 91 of file lpb.c.

unsigned int xdata eeptemp_addr

Definition at line 92 of file lpb.c.

unsigned char xdata* eeptemp_source

Definition at line 93 of file lpb.c.

unsigned char xdata FCSdevi1

Definition at line 85 of file lpb.c.

unsigned char xdata FCSorig1

Definition at line 85 of file lpb.c.

unsigned char hbyte

Definition at line 79 of file lpb.c.

float xdata htemperature

Definition at line 83 of file lpb.c.

unsigned char xdata humicount

Definition at line 82 of file lpb.c.

float xdata humidity

Definition at line 83 of file lpb.c.

unsigned long xdata humidTime = 0

Definition at line 78 of file lpb.c.

unsigned char lbyte

Definition at line 79 of file lpb.c.

sbit LPB_CSn = P0 ^ 4

Definition at line 74 of file lpb.c.

sbit LTC2620_Flag = bChange ^ 3

Definition at line 66 of file lpb.c.

char code node_name[] = "LPB"

Definition at line 50 of file lpb.c.

unsigned int xdata rSHThumi1

Definition at line 84 of file lpb.c.

unsigned int xdata rSHTtemp1

Definition at line 84 of file lpb.c.

sbit SPI_MISO = MSCB_SPI_MISO

Definition at line 72 of file lpb.c.

sbit SPI_MOSI = MSCB_SPI_MOSI

Definition at line 71 of file lpb.c.

sbit SPI_SCK = MSCB_SPI_SCK

Definition at line 70 of file lpb.c.

unsigned char xdata status

Definition at line 82 of file lpb.c.

char idata svn_rev_code[] = "$Rev: 1189 $"

Definition at line 51 of file lpb.c.

SYS_INFO sys_info
unsigned char tcounter

Definition at line 89 of file lpb.c.

MSCB_INFO_VAR* variables = vars

Definition at line 156 of file lpb.c.

MSCB_INFO_VAR code vars[]

Definition at line 98 of file lpb.c.


Generated on 1 Feb 2022 for FGDC8051-LPB by  doxygen 1.6.1