GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GNAT / V2-0-1 > gnat_xbrd / sun-gcc
#include "GNAT/xbrd_hw.h"
Functions | |
int | xbrd_Probe (xbrdHandle gx) |
attempts simple test for board existance | |
int | xbrd_HWver (xbrdHandle gx, unsigned short int *version, unsigned short int *revision) |
fetchs the hardware version and revision numbers from the board | |
int | xbrd_SWver (xbrdHandle gx, unsigned short int *version, unsigned short int *revision) |
fetchs the software version and revision numbers from the board | |
int | xbrd_Version (xbrdHandle gx, unsigned short hwVer, unsigned short hwRev, unsigned short swVer, unsigned short swRev) |
Checks the COMM Board hardware version/revision. | |
int | xbrd_DACload (xbrdHandle gx, unsigned short nDAC, unsigned int val) |
Loads the specified DAC with val. | |
int | xbrd_DACread (xbrdHandle gx, unsigned short nDAC, unsigned int *val) |
Reads the specified DAC. | |
int | xbrd_ADCload (xbrdHandle gx, unsigned short nADC, unsigned int val) |
Loads the specified ADC with val. | |
int | xbrd_ADCread (xbrdHandle gx, unsigned short nADC, unsigned int *val) |
Reads the specified ADC. |
int xbrd_ADCload | ( | xbrdHandle | gx, | |
unsigned short | nADC, | |||
unsigned int | val | |||
) |
Loads the specified ADC with val.
gx | handle of device | |
nADC | index of ADC to load | |
val | 32-bit value to load into ADC |
References G_OK, GX_VERIFY_HANDLE, _xbrd_regBlock::m_ADC, _xbrd::m_baseAddr, N_ADC_REG, and XBRD_ERR_BAD_PARAM.
int xbrd_ADCread | ( | xbrdHandle | gx, | |
unsigned short | nADC, | |||
unsigned int * | val | |||
) |
Reads the specified ADC.
gx | handle of device | |
nADC | index of ADC to read | |
val | pointer to storage for 32-bit ADC value. |
References G_OK, GX_VERIFY_HANDLE, _xbrd_regBlock::m_ADC, _xbrd::m_baseAddr, N_ADC_REG, XBRD_ERR_ADC_NOT_READY, and XBRD_ERR_BAD_PARAM.
int xbrd_DACload | ( | xbrdHandle | gx, | |
unsigned short | nDAC, | |||
unsigned int | val | |||
) |
Loads the specified DAC with val.
gx | handle of device | |
nDAC | index of DAC to load | |
val | 32-bit value to load into DAC |
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1987
To perform a normal "write value" operation use the following pattern:
1 1 1 1 1 1 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 =============================== 0 1 0 D D D D D D D D D D D D 0
0 - bit is not set 1 - bit is set D - data bit of 12-bit DAC value
References G_OK, GX_VERIFY_HANDLE, _xbrd::m_baseAddr, _xbrd_regBlock::m_DAC, N_DAC_REG, and XBRD_ERR_BAD_PARAM.
int xbrd_DACread | ( | xbrdHandle | gx, | |
unsigned short | nDAC, | |||
unsigned int * | val | |||
) |
Reads the specified DAC.
gx | handle of device | |
nDAC | index of DAC to read | |
val | pointer to storage for 32-bit DAC value. |
References G_OK, GX_VERIFY_HANDLE, _xbrd::m_baseAddr, _xbrd_regBlock::m_DAC, N_DAC_REG, XBRD_ERR_BAD_PARAM, and XBRD_ERR_DAC_NOT_READY.
int xbrd_HWver | ( | xbrdHandle | gx, | |
unsigned short int * | version, | |||
unsigned short int * | revision | |||
) |
fetchs the hardware version and revision numbers from the board
gx | handle of device | |
version | 3 LSB contain hardware version number | |
revision | 3 LSB contain hardware revision number |
References _xbrd_regControl::bf, G_OK, GX_VERIFY_HANDLE, _BFxbrd_regControl::hwRev, _BFxbrd_regControl::hwVer, _xbrd::m_baseAddr, _xbrd_regBlock::m_ctrl, _xbrd_regControl::ui, and XBRD_ERR_BAD_PARAM.
Referenced by xbrd_PrintDriverInfo(), and xbrd_Version().
int xbrd_Probe | ( | xbrdHandle | gx | ) |
attempts simple test for board existance
gx | handle of device to probe |
References _xbrd_regControl::bf, G_OK, _xbrd::m_baseAddr, _xbrd_regBlock::m_ctrl, _xbrd_regControl::ui, _BFxbrd_regControl::vec, and XBRD_ERR_BRD_DETECT.
Referenced by __xbrd_Open().
int xbrd_SWver | ( | xbrdHandle | gx, | |
unsigned short int * | version, | |||
unsigned short int * | revision | |||
) |
fetchs the software version and revision numbers from the board
gx | handle of device | |
version | 3 LSB contain software version number | |
revision | 3 LSB contain software revision number |
References _xbrd_regControl::bf, G_OK, GX_VERIFY_HANDLE, _xbrd::m_baseAddr, _xbrd_regBlock::m_ctrl, _BFxbrd_regControl::swRev, _BFxbrd_regControl::swVer, _xbrd_regControl::ui, and XBRD_ERR_BAD_PARAM.
Referenced by xbrd_PrintDriverInfo(), and xbrd_Version().
int xbrd_Version | ( | xbrdHandle | gx, | |
unsigned short | hwVer, | |||
unsigned short | hwRev, | |||
unsigned short | swVer, | |||
unsigned short | swRev | |||
) |
Checks the COMM Board hardware version/revision.
gx | handle of device | |
hwVer | VME XBRD hardware version | |
hwRev | VME XBRD hardware revision | |
swVer | VME XBRD firmware version | |
swRev | VME XBRD firmware revision |
References _CHECK, G_OK, XBRD_ERR, xbrd_HWver(), and xbrd_SWver().
Referenced by xbrd_Init().