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 150:35a4db3081c1, committed 2017-09-24
- Comitter:
- WiredHome
- Date:
- Sun Sep 24 02:09:57 2017 +0000
- Parent:
- 149:c62c4b2d6a15
- Child:
- 151:ae94daaaf8ad
- Child:
- 152:a013ac0133e4
- Commit message:
- callback functions is conditional on mbed version. Somewhere below 128 it does not use the extra callback api.
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 Sun Aug 06 17:05:54 2017 +0000 +++ b/RA8875.cpp Sun Sep 24 02:09:57 2017 +0000 @@ -141,7 +141,11 @@ // Interrupt m_irq->mode(PullUp); m_irq->enable_irq(); + #if MBED_LIBRARY_VERSION > 122 // Is this the right version? m_irq->fall(callback(this, &RA8875::TouchPanelISR)); + #else + m_irq->fall(this, &RA8875::TouchPanelISR); + #endif TouchPanelInit(); }
--- a/RA8875_Touch.cpp Sun Aug 06 17:05:54 2017 +0000 +++ b/RA8875_Touch.cpp Sun Sep 24 02:09:57 2017 +0000 @@ -35,7 +35,13 @@ WriteCommand(INTC2, RA8875_INT_TP); // reg INTC2: Clear any TP interrupt flag touchSample = 0; touchState = no_cal; + //touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS); + #if MBED_LIBRARY_VERSION > 122 // Is this the right version? touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS); + #else + touchTicker.attach_us(this, &RA8875::_TouchTicker, TOUCH_TICKER_uS); + #endif + touchTimer.start(); touchTimer.reset(); } @@ -67,7 +73,13 @@ touchSample = 0; touchState = no_cal; if (bTpEnable == TP_ENABLE) { + //touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS); + #if MBED_LIBRARY_VERSION > 122 // Is this the right version? touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS); + #else + touchTicker.attach_us(this, &RA8875::_TouchTicker, TOUCH_TICKER_uS); + #endif + touchTimer.start(); touchTimer.reset(); } else {