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

#include <stdio.h>
#include <math.h>
#include "mscbemb.h"
#include "cmb.h"
#include "Devices/adc_internal.h"
#include "Protocols/CMB_SPI_handler.h"

Go to the source code of this file.

Functions

void publishCtlCsr (void)
void publishErr (bit errbit)
void publishAll ()
void CMB_SPI_WriteByte (unsigned char cmbinst, unsigned char cmbdata)
unsigned char CMB_SPI_ReadByte (unsigned char cmbinst)
void PublishVariable (float xdata *pvarDest, float varSrce, bit errbit)
unsigned int NodeAdd_get (void)
void switchonoff (unsigned char command)
float read_voltage (unsigned char channel, unsigned int *rvalue, unsigned char gain)
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 [] = "cmb"
char idata svn_rev_code [] = "$Rev: 942 $"
sbit CFG_RECOVER = P2 ^ 0
sbit CMB_CSn = P2 ^ 1
sbit CLK_SEL = P0 ^ 7
sbit V4_ENn = P2 ^ 3
sbit V4_OCn = P2 ^ 4
unsigned char idata _n_sub_addr = 1
unsigned char xdata channel
unsigned long xdata tempTime = 0
unsigned long xdata sstTime = 0
unsigned char xdata status
unsigned char xdata NodeOK = 0
unsigned int xdata crate_add = 0
unsigned int xdata pca_add = 0
unsigned char bdata bChange
sbit bCPupdoitNOW = bChange ^ 0
sbit EEP_CTR_Flag = bChange ^ 1
sbit bMeasuredOnce = bChange ^ 2
MSCB_INFO_VAR code vars []
MSCB_INFO_VAR * variables = vars
SYS_INFO sys_info

Function Documentation

unsigned char CMB_SPI_ReadByte ( unsigned char  cmbinst  ) 

Definition at line 146 of file cmb.c.

void CMB_SPI_WriteByte ( unsigned char  cmbinst,
unsigned char  cmbdata 
)

Definition at line 137 of file cmb.c.

unsigned int NodeAdd_get ( void   ) 

Definition at line 166 of file cmb.c.

void publishAll (  ) 

Definition at line 128 of file cmb.c.

void publishCtlCsr ( void   ) 

Definition at line 110 of file cmb.c.

void publishErr ( bit  errbit  ) 

Definition at line 119 of file cmb.c.

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

Definition at line 157 of file cmb.c.

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

Definition at line 236 of file cmb.c.

void switchonoff ( unsigned char  command  ) 

Definition at line 186 of file cmb.c.

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

Definition at line 406 of file cmb.c.

void user_init ( unsigned char  init  ) 

Definition at line 264 of file cmb.c.

void user_loop ( void   ) 

Definition at line 415 of file cmb.c.

unsigned char user_read ( unsigned char  index  ) 

Definition at line 399 of file cmb.c.

void user_write ( unsigned char  index  ) 

Definition at line 386 of file cmb.c.


Variable Documentation

unsigned char idata _n_sub_addr = 1

Definition at line 49 of file cmb.c.

unsigned char bdata bChange

Definition at line 59 of file cmb.c.

sbit bCPupdoitNOW = bChange ^ 0

Definition at line 61 of file cmb.c.

sbit bMeasuredOnce = bChange ^ 2

Definition at line 63 of file cmb.c.

sbit CFG_RECOVER = P2 ^ 0

Definition at line 41 of file cmb.c.

unsigned char xdata channel

Definition at line 52 of file cmb.c.

sbit CLK_SEL = P0 ^ 7

Definition at line 43 of file cmb.c.

sbit CMB_CSn = P2 ^ 1

Definition at line 42 of file cmb.c.

unsigned int xdata crate_add = 0

Definition at line 55 of file cmb.c.

sbit EEP_CTR_Flag = bChange ^ 1

Definition at line 62 of file cmb.c.

char code node_name[] = "cmb"

Definition at line 37 of file cmb.c.

unsigned char xdata NodeOK = 0

Definition at line 54 of file cmb.c.

unsigned int xdata pca_add = 0

Definition at line 55 of file cmb.c.

unsigned long xdata sstTime = 0

Definition at line 53 of file cmb.c.

unsigned char xdata status

Definition at line 54 of file cmb.c.

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

Definition at line 38 of file cmb.c.

SYS_INFO sys_info
unsigned long xdata tempTime = 0

Definition at line 53 of file cmb.c.

sbit V4_ENn = P2 ^ 3

Definition at line 44 of file cmb.c.

sbit V4_OCn = P2 ^ 4

Definition at line 45 of file cmb.c.

MSCB_INFO_VAR* variables = vars

Definition at line 103 of file cmb.c.

MSCB_INFO_VAR code vars[]

Definition at line 67 of file cmb.c.


Generated on 1 Feb 2022 for C8051-CMB by  doxygen 1.6.1