jungfrau vref_prech, dac enum similar to mainenum

This commit is contained in:
maliakal_d 2019-10-08 18:00:22 +02:00
parent 29a7e227a3
commit b109ea8d7d
4 changed files with 3 additions and 3 deletions

View File

@ -909,7 +909,7 @@ void setDAC(enum DACINDEX ind, int val, int mV) {
#else #else
if (LTC2620_SetDACValue((int)ind, val, mV, &dacval) == OK) { if (LTC2620_SetDACValue((int)ind, val, mV, &dacval) == OK) {
dacValues[ind] = dacval; dacValues[ind] = dacval;
if (ind == VREF_COMP && (val >= 0)) {//FIXME: if val == pwr down value, write 0? if (ind == J_VREF_COMP && (val >= 0)) {//FIXME: if val == pwr down value, write 0?
bus_w (VREF_COMP_MOD_REG, (bus_r(VREF_COMP_MOD_REG) &~ (VREF_COMP_MOD_MSK)) // reset bus_w (VREF_COMP_MOD_REG, (bus_r(VREF_COMP_MOD_REG) &~ (VREF_COMP_MOD_MSK)) // reset
| ((val << VREF_COMP_MOD_OFST) & VREF_COMP_MOD_MSK)); // or it with value | ((val << VREF_COMP_MOD_OFST) & VREF_COMP_MOD_MSK)); // or it with value
} }

View File

@ -38,7 +38,7 @@ typedef struct udp_header_struct {
/* Enums */ /* Enums */
enum ADCINDEX {TEMP_FPGA, TEMP_ADC}; enum ADCINDEX {TEMP_FPGA, TEMP_ADC};
enum DACINDEX {VB_COMP, VDD_PROT, VIN_COM, VREF_PRECH, VB_PIXBUF, VB_DS, VREF_DS, VREF_COMP }; enum DACINDEX {J_VB_COMP, J_VDD_PROT, J_VIN_COM, J_VREF_PRECH, J_VB_PIXBUF, J_VB_DS, J_VREF_DS, J_VREF_COMP };
#define DEFAULT_DAC_VALS { 1220, /* VB_COMP */ \ #define DEFAULT_DAC_VALS { 1220, /* VB_COMP */ \
3000, /* VDD_PROT */ \ 3000, /* VDD_PROT */ \
1053, /* VIN_COM */ \ 1053, /* VIN_COM */ \

View File

@ -6,7 +6,7 @@
#define APIMOENCH 0x190820 #define APIMOENCH 0x190820
#define APICTB 0x190930 #define APICTB 0x190930
#define APIGOTTHARD 0x190930 #define APIGOTTHARD 0x190930
#define APIJUNGFRAU 0x190930
#define APIEIGER 0x190930 #define APIEIGER 0x190930
#define APIMYTHEN3 0x191008 #define APIMYTHEN3 0x191008
#define APIGOTTHARD2 0x191008 #define APIGOTTHARD2 0x191008
#define APIJUNGFRAU 0x191008