mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 00:37:12 +02:00
Dac (#67)
* dac WIP * dacs WIP * DACs are working with names * namechanges of vrfsh->vshaper, vrfshnpol->vshaperneg * pattern for MY3, configure MAC for MY3
This commit is contained in:

committed by
Dhanya Thattil

parent
16f7b42533
commit
5f94b5c246
43
slsDetectorServers/slsDetectorServer/include/LTC2620_Driver.h
Executable file
43
slsDetectorServers/slsDetectorServer/include/LTC2620_Driver.h
Executable file
@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
/**
|
||||
* Set Defines
|
||||
* @param hardMaxV maximum hardware limit
|
||||
* @param driverfname driver file name
|
||||
* @param numdacs number of dacs
|
||||
*/
|
||||
void LTC2620_D_SetDefines(int hardMaxV, char* driverfname, int numdacs);
|
||||
|
||||
|
||||
/**
|
||||
* Get max number of steps
|
||||
*/
|
||||
int LTC2620_D_GetMaxNumSteps();
|
||||
|
||||
/**
|
||||
* Convert voltage to dac units
|
||||
* @param voltage value in mv
|
||||
* @param dacval pointer to value converted to dac units
|
||||
* @returns FAIL when voltage outside limits, OK if conversion successful
|
||||
*/
|
||||
int LTC2620_D_VoltageToDac(int voltage, int* dacval);
|
||||
|
||||
/**
|
||||
* Convert dac units to voltage
|
||||
* @param dacval dac units
|
||||
* @param voltage pointer to value converted to mV
|
||||
* @returns FAIL when voltage outside limits, OK if conversion successful
|
||||
*/
|
||||
int LTC2620_D_DacToVoltage(int dacval, int* voltage);
|
||||
|
||||
/**
|
||||
* Set value
|
||||
* @param dacnum dac index
|
||||
* @param val value to set
|
||||
* @param mV 1 for mv, else 0
|
||||
* @param dacval pointer to dac value
|
||||
* @return OK or FAIL
|
||||
*/
|
||||
int LTC2620_D_SetDACValue(int dacnum, int val, int mV, int *dacval);
|
Reference in New Issue
Block a user