Jungfrausync (#519)

* jungfrau sync
This commit is contained in:
Dhanya Thattil
2022-08-23 10:29:16 +02:00
committed by GitHub
parent da16c1101c
commit 4638bf7cf8
16 changed files with 158 additions and 4 deletions

View File

@ -210,6 +210,8 @@
#define EXT_SIGNAL_OFST (0)
#define EXT_SIGNAL_MSK (0x00000001 << EXT_SIGNAL_OFST)
#define EXT_SYNC_OFST (4)
#define EXT_SYNC_MSK (0x00000001 << EXT_SYNC_OFST)
/* Control Register */
#define CONTROL_REG (0x4F << MEM_MAP_SHIFT)

View File

@ -1380,6 +1380,19 @@ int isMaster(int *retval) {
return OK;
}
int getSynchronization() {
return ((bus_r(EXT_SIGNAL_REG) & EXT_SYNC_MSK) >> EXT_SYNC_OFST);
}
void setSynchronization(int enable) {
LOG(logINFOBLUE,
("%s Synchronization\n", (enable ? "Enabling" : "Disabling")));
if (enable)
bus_w(EXT_SIGNAL_REG, bus_r(EXT_SIGNAL_REG) | EXT_SYNC_MSK);
else
bus_w(EXT_SIGNAL_REG, bus_r(EXT_SIGNAL_REG) & ~EXT_SYNC_MSK);
}
void setTiming(enum timingMode arg) {
switch (arg) {
case AUTO_TIMING: