mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 09:10:01 +02:00
swapping left and right for trasnmission delay to correspond to left and right of top
This commit is contained in:
parent
7535decd7f
commit
ac5d60155d
@ -492,7 +492,7 @@ int Beb_SetDataStream(enum portPosition port, int enable) {
|
|||||||
u_int32_t reg = XPAR_GPIO_P15_STREAMING_REG;
|
u_int32_t reg = XPAR_GPIO_P15_STREAMING_REG;
|
||||||
u_int32_t mask = (port == LEFT ? XPAR_GPIO_LFT_STRM_DSBL_MSK
|
u_int32_t mask = (port == LEFT ? XPAR_GPIO_LFT_STRM_DSBL_MSK
|
||||||
: XPAR_GPIO_RGHT_STRM_DSBL_MSK);
|
: XPAR_GPIO_RGHT_STRM_DSBL_MSK);
|
||||||
// invert mask if bottom
|
// invert left/right if bottom
|
||||||
if (!Beb_top) {
|
if (!Beb_top) {
|
||||||
mask = (port == LEFT ? XPAR_GPIO_RGHT_STRM_DSBL_MSK
|
mask = (port == LEFT ? XPAR_GPIO_RGHT_STRM_DSBL_MSK
|
||||||
: XPAR_GPIO_LFT_STRM_DSBL_MSK);
|
: XPAR_GPIO_LFT_STRM_DSBL_MSK);
|
||||||
@ -534,7 +534,7 @@ int Beb_GetDataStream(enum portPosition port, int *retval) {
|
|||||||
u_int32_t reg = XPAR_GPIO_P15_STREAMING_REG;
|
u_int32_t reg = XPAR_GPIO_P15_STREAMING_REG;
|
||||||
u_int32_t mask = (port == LEFT ? XPAR_GPIO_LFT_STRM_DSBL_MSK
|
u_int32_t mask = (port == LEFT ? XPAR_GPIO_LFT_STRM_DSBL_MSK
|
||||||
: XPAR_GPIO_RGHT_STRM_DSBL_MSK);
|
: XPAR_GPIO_RGHT_STRM_DSBL_MSK);
|
||||||
// invert mask if bottom
|
// invert left/right if bottom
|
||||||
if (!Beb_top) {
|
if (!Beb_top) {
|
||||||
mask = (port == LEFT ? XPAR_GPIO_RGHT_STRM_DSBL_MSK
|
mask = (port == LEFT ? XPAR_GPIO_RGHT_STRM_DSBL_MSK
|
||||||
: XPAR_GPIO_LFT_STRM_DSBL_MSK);
|
: XPAR_GPIO_LFT_STRM_DSBL_MSK);
|
||||||
@ -692,6 +692,10 @@ int Beb_GetTransmissionDelayLeft() {
|
|||||||
return Beb_deactivated_transmission_delay_left;
|
return Beb_deactivated_transmission_delay_left;
|
||||||
}
|
}
|
||||||
u_int32_t offset = TXM_DELAY_LEFT_OFFSET;
|
u_int32_t offset = TXM_DELAY_LEFT_OFFSET;
|
||||||
|
// invert left/right if bottom
|
||||||
|
if (!Beb_top) {
|
||||||
|
offset = TXM_DELAY_RIGHT_OFFSET;
|
||||||
|
}
|
||||||
u_int32_t *csp0base = 0;
|
u_int32_t *csp0base = 0;
|
||||||
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_SYS_BASEADDR);
|
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_SYS_BASEADDR);
|
||||||
if (fd <= 0) {
|
if (fd <= 0) {
|
||||||
@ -716,6 +720,10 @@ int Beb_SetTransmissionDelayLeft(int value) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
u_int32_t offset = TXM_DELAY_LEFT_OFFSET;
|
u_int32_t offset = TXM_DELAY_LEFT_OFFSET;
|
||||||
|
// invert left/right if bottom
|
||||||
|
if (!Beb_top) {
|
||||||
|
offset = TXM_DELAY_RIGHT_OFFSET;
|
||||||
|
}
|
||||||
u_int32_t *csp0base = 0;
|
u_int32_t *csp0base = 0;
|
||||||
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_SYS_BASEADDR);
|
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_SYS_BASEADDR);
|
||||||
if (fd <= 0) {
|
if (fd <= 0) {
|
||||||
@ -736,6 +744,10 @@ int Beb_GetTransmissionDelayRight() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u_int32_t offset = TXM_DELAY_RIGHT_OFFSET;
|
u_int32_t offset = TXM_DELAY_RIGHT_OFFSET;
|
||||||
|
// invert left/right if bottom
|
||||||
|
if (!Beb_top) {
|
||||||
|
offset = TXM_DELAY_LEFT_OFFSET;
|
||||||
|
}
|
||||||
u_int32_t *csp0base = 0;
|
u_int32_t *csp0base = 0;
|
||||||
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_SYS_BASEADDR);
|
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_SYS_BASEADDR);
|
||||||
if (fd <= 0) {
|
if (fd <= 0) {
|
||||||
@ -760,6 +772,10 @@ int Beb_SetTransmissionDelayRight(int value) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
u_int32_t offset = TXM_DELAY_RIGHT_OFFSET;
|
u_int32_t offset = TXM_DELAY_RIGHT_OFFSET;
|
||||||
|
// invert left/right if bottom
|
||||||
|
if (!Beb_top) {
|
||||||
|
offset = TXM_DELAY_LEFT_OFFSET;
|
||||||
|
}
|
||||||
u_int32_t *csp0base = 0;
|
u_int32_t *csp0base = 0;
|
||||||
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_SYS_BASEADDR);
|
int fd = Beb_open(&csp0base, XPAR_PLB_GPIO_SYS_BASEADDR);
|
||||||
if (fd <= 0) {
|
if (fd <= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user