programing problem fixed

This commit is contained in:
maliakal_d 2021-10-28 15:51:29 +02:00
parent c911fe4c85
commit c3eff0246a
5 changed files with 8 additions and 3 deletions

View File

@ -32,9 +32,12 @@ void defineGPIOpins() {
// define the gpio pins
system("echo 7 > /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
system("echo in > /sys/class/gpio/gpio7/direction");
system("echo out > /sys/class/gpio/gpio9/direction");
system("echo out > /sys/class/gpio/gpio3/direction");
LOG(logINFO, ("gpio pins defined\n"));
gpioDefined = 1;
} else
@ -47,6 +50,7 @@ void FPGAdontTouchFlash() {
#endif
// tell FPGA to not touch flash
system("echo 0 > /sys/class/gpio/gpio9/value");
system("echo 1 > /sys/class/gpio/gpio3/value");
// usleep(100*1000);
}
@ -56,6 +60,7 @@ void FPGATouchFlash() {
#endif
// tell FPGA to touch flash to program itself
system("echo 1 > /sys/class/gpio/gpio9/value");
system("echo 0 > /sys/class/gpio/gpio3/value");
}
void resetFPGA() {

View File

@ -6,10 +6,10 @@
#define APILIB 0x211027
#define APIRECEIVER 0x211020
#define APIGUI 0x211021
#define APICTB 0x211027
#define APIGOTTHARD 0x211027
#define APIGOTTHARD2 0x211027
#define APIJUNGFRAU 0x211027
#define APIMYTHEN3 0x211027
#define APIMOENCH 0x211025
#define APIEIGER 0x211027
#define APIJUNGFRAU 0x211028
#define APICTB 0x211028
#define APIMOENCH 0x211027