Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.
Dependents: FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more
Fork of SPI_TFT by
See Components - RA8875 Based Display
Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.
Offline Help Manual (Windows chm)
/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)
Revision 205:f215dc32736b, committed 2020-05-23
- Comitter:
- WiredHome
- Date:
- Sat May 23 15:59:11 2020 +0000
- Parent:
- 204:48e05a27de25
- Child:
- 206:83edda283d90
- Commit message:
- Defect correction - disable irq while configuring the FT5206 and GSL1680 touch controllers to avoid unexpected ISRs.
Changed in this revision
RA8875.cpp | Show annotated file Show diff for this revision Revisions of this file |
RA8875_Touch.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/RA8875.cpp Thu May 21 01:32:59 2020 +0000 +++ b/RA8875.cpp Sat May 23 15:59:11 2020 +0000 @@ -235,7 +235,7 @@ #else m_irq->fall(this, &RA8875::TouchPanelISR); #endif - m_irq->enable_irq(); + m_irq->disable_irq(); // ensure it is disabled until the init() TouchPanelInit(); INFO("RA8875 end."); } @@ -268,7 +268,6 @@ // Interrupt m_irq->mode(PullUp); - m_irq->enable_irq(); #if MBED_VERSION >= MBED_ENCODE_VERSION(5,8,0) eventThread.start(callback(&queue, &EventQueue::dispatch_forever)); m_irq->fall(queue.event(callback(this, &RA8875::TouchPanelISR))); @@ -277,6 +276,7 @@ #else m_irq->fall(this, &RA8875::TouchPanelISR); #endif + m_irq->disable_irq(); // ensure it is disabled until the init() TouchPanelInit(); }
--- a/RA8875_Touch.cpp Thu May 21 01:32:59 2020 +0000 +++ b/RA8875_Touch.cpp Sat May 23 15:59:11 2020 +0000 @@ -50,6 +50,7 @@ { RetCode_t r = noerror; + m_irq->disable_irq(); // ensure disabled while configuring it panelTouched = false; if (useTouchPanel == TP_GSL1680) { INFO("TouchPanelInit: TP_GSL1680"); @@ -79,6 +80,7 @@ timeSinceTouch.reset(); r = _internal_ts_cal(); } + m_irq->enable_irq(); return r; } @@ -92,6 +94,7 @@ TouchPanelInit(); } else { INFO("TouchPanelInit: TP_RES"); + m_irq->disable_irq(); // ensure disabled while configuring it // Parameter bounds check if( \ !(bTpEnable == TP_ENABLE || bTpEnable == TP_ENABLE) || \ @@ -125,6 +128,7 @@ timeSinceTouch.stop(); } _internal_ts_cal(); + m_irq->enable_irq(); } return noerror; }