A library for ADS7843 touch-screens which is interrupt driven, allowing you to register callback handlers for touchStart, touchMove and touchEnd events.
Dependents: TouchScreenCalibrate TouchScreenGUIDemo
Diff: TouchScreen.cpp
- Revision:
- 2:e5ea47fb1ede
- Parent:
- 0:3f0160100cc9
- Child:
- 3:8b5fcf3857ac
diff -r 9bd85d0331a8 -r e5ea47fb1ede TouchScreen.cpp --- a/TouchScreen.cpp Fri Mar 25 16:49:03 2016 +0000 +++ b/TouchScreen.cpp Sun May 08 14:43:16 2016 +0000 @@ -234,6 +234,7 @@ { unsigned int tmp; + __disable_irq(); _cs = 0; wait_us(1); _spi.write(cmd); @@ -248,5 +249,7 @@ tmp = tmp & 0x0ff0; // mask off lowest 4 bits since they are meaningless } tmp &= 0xfff; + + __enable_irq(); return tmp; } \ No newline at end of file