mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
programing problem fixed
This commit is contained in:
parent
c911fe4c85
commit
c3eff0246a
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -32,9 +32,12 @@ void defineGPIOpins() {
|
|||||||
// define the gpio pins
|
// define the gpio pins
|
||||||
system("echo 7 > /sys/class/gpio/export");
|
system("echo 7 > /sys/class/gpio/export");
|
||||||
system("echo 9 > /sys/class/gpio/export");
|
system("echo 9 > /sys/class/gpio/export");
|
||||||
|
// gpio 3 = not chip enable
|
||||||
|
system("echo 3 > /sys/class/gpio/export");
|
||||||
// define their direction
|
// define their direction
|
||||||
system("echo in > /sys/class/gpio/gpio7/direction");
|
system("echo in > /sys/class/gpio/gpio7/direction");
|
||||||
system("echo out > /sys/class/gpio/gpio9/direction");
|
system("echo out > /sys/class/gpio/gpio9/direction");
|
||||||
|
system("echo out > /sys/class/gpio/gpio3/direction");
|
||||||
LOG(logINFO, ("gpio pins defined\n"));
|
LOG(logINFO, ("gpio pins defined\n"));
|
||||||
gpioDefined = 1;
|
gpioDefined = 1;
|
||||||
} else
|
} else
|
||||||
@ -47,6 +50,7 @@ void FPGAdontTouchFlash() {
|
|||||||
#endif
|
#endif
|
||||||
// tell FPGA to not touch flash
|
// tell FPGA to not touch flash
|
||||||
system("echo 0 > /sys/class/gpio/gpio9/value");
|
system("echo 0 > /sys/class/gpio/gpio9/value");
|
||||||
|
system("echo 1 > /sys/class/gpio/gpio3/value");
|
||||||
// usleep(100*1000);
|
// usleep(100*1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,6 +60,7 @@ void FPGATouchFlash() {
|
|||||||
#endif
|
#endif
|
||||||
// tell FPGA to touch flash to program itself
|
// tell FPGA to touch flash to program itself
|
||||||
system("echo 1 > /sys/class/gpio/gpio9/value");
|
system("echo 1 > /sys/class/gpio/gpio9/value");
|
||||||
|
system("echo 0 > /sys/class/gpio/gpio3/value");
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetFPGA() {
|
void resetFPGA() {
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#define APILIB 0x211027
|
#define APILIB 0x211027
|
||||||
#define APIRECEIVER 0x211020
|
#define APIRECEIVER 0x211020
|
||||||
#define APIGUI 0x211021
|
#define APIGUI 0x211021
|
||||||
#define APICTB 0x211027
|
|
||||||
#define APIGOTTHARD 0x211027
|
#define APIGOTTHARD 0x211027
|
||||||
#define APIGOTTHARD2 0x211027
|
#define APIGOTTHARD2 0x211027
|
||||||
#define APIJUNGFRAU 0x211027
|
|
||||||
#define APIMYTHEN3 0x211027
|
#define APIMYTHEN3 0x211027
|
||||||
#define APIMOENCH 0x211025
|
|
||||||
#define APIEIGER 0x211027
|
#define APIEIGER 0x211027
|
||||||
|
#define APIJUNGFRAU 0x211028
|
||||||
|
#define APICTB 0x211028
|
||||||
|
#define APIMOENCH 0x211027
|
||||||
|
Loading…
x
Reference in New Issue
Block a user