diff --git a/touchpad.c b/touchpad.c index 6f786f77..1d052fc3 100644 --- a/touchpad.c +++ b/touchpad.c @@ -1,7 +1,7 @@ #include "touchpad.h" #include "glcd.h" -static struct cal cal = { +volatile static struct cal cal = { 1, 1, 0, 0 }; diff --git a/touchpad.h b/touchpad.h index 97efb09d..947077cc 100644 --- a/touchpad.h +++ b/touchpad.h @@ -9,7 +9,7 @@ #define SET_CS(a) (TP_PORT->BSRR = 1 << (TP_CS + (a ? 0 : 16))) -volatile struct cal { +struct cal { float xm; float ym; float xn;