mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
veotalg for g2
This commit is contained in:
@ -90,8 +90,14 @@
|
||||
|
||||
#define CONFIG_VETO_ENBL_OFST (0)
|
||||
#define CONFIG_VETO_ENBL_MSK (0x00000001 << CONFIG_VETO_ENBL_OFST)
|
||||
#define CONFIG_VETO_CH_3GB_ALG_OFST (8)
|
||||
#define CONFIG_VETO_CH_3GB_ALG_MSK (0x00000007 << CONFIG_VETO_CH_3GB_ALG_OFST)
|
||||
#define CONFIG_VETO_CH_3GB_ALG_DEFAULT_VAL ((0x0 << CONFIG_VETO_CH_3GB_ALG_OFST) & CONFIG_VETO_CH_3GB_ALG_MSK)
|
||||
#define CONFIG_VETO_CH_3GB_ENBL_OFST (11)
|
||||
#define CONFIG_VETO_CH_3GB_ENBL_MSK (0x00000001 << CONFIG_VETO_CH_3GB_ENBL_OFST)
|
||||
#define CONFIG_VETO_CH_10GB_ALG_OFST (12)
|
||||
#define CONFIG_VETO_CH_10GB_ALG_MSK (0x00000007 << CONFIG_VETO_CH_10GB_ALG_OFST)
|
||||
#define CONFIG_VETO_CH_10GB_ALG_DEFAULT_VAL ((0x0 << CONFIG_VETO_CH_10GB_ALG_OFST) & CONFIG_VETO_CH_10GB_ALG_MSK)
|
||||
#define CONFIG_VETO_CH_10GB_ENBL_OFST (15)
|
||||
#define CONFIG_VETO_CH_10GB_ENBL_MSK (0x00000001 << CONFIG_VETO_CH_10GB_ENBL_OFST)
|
||||
|
||||
|
@ -2595,6 +2595,36 @@ int getVetoStream() {
|
||||
return ((bus_r(CONFIG_REG) & CONFIG_VETO_CH_3GB_ENBL_MSK) ? 1 : 0);
|
||||
}
|
||||
|
||||
enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface) {
|
||||
// 3gbe
|
||||
if (interface == I3GBE) {
|
||||
int retval = ((bus_r(CONFIG_REG) & CONFIG_VETO_CH_3GB_ALG_MSK) >>
|
||||
CONFIG_VETO_CH_3GB_ALG_OFST);
|
||||
switch (retval) {
|
||||
// more to follow
|
||||
case CONFIG_VETO_CH_3GB_ALG_DEFAULT_VAL:
|
||||
return DEFAULT_ALGORITHM;
|
||||
default:
|
||||
LOG(logERROR, ("unknown algorithm %d for 3gbe\n", retval));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
// 10gbe
|
||||
int retval = ((bus_r(CONFIG_REG) & CONFIG_VETO_CH_10GB_ALG_MSK) >>
|
||||
CONFIG_VETO_CH_10GB_ALG_OFST);
|
||||
switch (retval) {
|
||||
// more to follow
|
||||
case CONFIG_VETO_CH_10GB_ALG_DEFAULT_VAL:
|
||||
return DEFAULT_ALGORITHM;
|
||||
default:
|
||||
LOG(logERROR, ("unknown algorithm %d for 3gbe\n", retval));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
void setVetoAlgorithm(enum ethernetInterface interface,
|
||||
enum vetoAlgorithm alg) {}
|
||||
|
||||
void setBadChannels(int nch, int *channels) {
|
||||
LOG(logINFO, ("Setting %d bad channels\n", nch));
|
||||
|
||||
|
Reference in New Issue
Block a user