mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
created the function to set transmission delay
This commit is contained in:
parent
a4e5db038d
commit
e1d54b72f8
@ -267,6 +267,35 @@ int Beb_Activate(int enable){
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int Beb_SetTransmissionDelay(int delay){
|
||||
//mapping new memory
|
||||
u_int32_t baseaddr, value = 0;
|
||||
|
||||
//open file pointer
|
||||
int fd = Beb_open(XPAR_PLB_GPIO_SYS_BASEADDR,&baseaddr);
|
||||
if(fd < 0){
|
||||
cprintf(BG_RED,"Deactivate FAIL\n");
|
||||
return -1;
|
||||
}
|
||||
else{
|
||||
if(delay > -1){
|
||||
value = Beb_Read32(baseaddr, TXM_DELAY_LEFT_OFFSET);
|
||||
cprintf(BLUE, "Transmission Delay value before:%d\n",value);
|
||||
Beb_Write32(baseaddr, TXM_DELAY_LEFT_OFFSET,delay);
|
||||
}
|
||||
|
||||
value = Beb_Read32(baseaddr, TXM_DELAY_LEFT_OFFSET);
|
||||
cprintf(BLUE,"Transmission Delay value:%d\n", value);
|
||||
}
|
||||
//close file pointer
|
||||
if(fd > 0)
|
||||
Beb_close(fd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int Beb_ResetToHardwareSettings(){
|
||||
//mapping new memory
|
||||
u_int32_t baseaddr, value = 0, ret = 1;
|
||||
|
@ -51,6 +51,7 @@ struct BebInfo{
|
||||
int Beb_SetMasterViaSoftware();
|
||||
int Beb_SetSlaveViaSoftware();
|
||||
int Beb_Activate(int enable);
|
||||
int Beb_SetTransmissionDelay(int delay);
|
||||
int Beb_ResetToHardwareSettings();
|
||||
u_int32_t Beb_GetFirmwareRevision();
|
||||
u_int32_t Beb_GetFirmwareSoftwareAPIVersion();
|
||||
|
@ -122,6 +122,8 @@
|
||||
#define OVERWRITE_HARDWARE_BIT 0x2
|
||||
#define DEACTIVATE_BIT 0x4
|
||||
|
||||
#define TXM_DELAY_LEFT_OFFSET 0x180
|
||||
|
||||
//command memory
|
||||
#define LEFT_OFFSET 0x0
|
||||
#define RIGHT_OFFSET 0x100
|
||||
|
@ -741,6 +741,7 @@ enum detectorSettings getSettings(){
|
||||
}
|
||||
|
||||
int startReceiver(int d){
|
||||
|
||||
printf("Going to prepare for acquisition with counter_bit:%d\n",Feb_Control_Get_Counter_Bit());
|
||||
Feb_Control_PrepareForAcquisition();
|
||||
printf("Going to reset Frame Number\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user