Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: dm_bubbles dm_calc dm_paint dm_sdcard_with_adapter ... more
Diff: DmTouch.h
- Revision:
- 14:2db7065edbec
- Parent:
- 11:264e19992620
diff -r 6ff2649b6c27 -r 2db7065edbec DmTouch.h --- a/DmTouch.h Fri Sep 18 14:59:13 2015 +0000 +++ b/DmTouch.h Mon Oct 12 08:35:35 2015 +0000 @@ -45,7 +45,7 @@ #if defined (DM_TOOLCHAIN_ARDUINO) DmTouch(Display disp, SpiMode spiMode=Auto, bool useIrq=true); #elif defined (DM_TOOLCHAIN_MBED) - DmTouch(Display disp, SpiMode spiMode=Hardware); + DmTouch(Display disp, PinName mosi=D11, PinName miso=D12, PinName clk=D13); #endif void init(); void readTouchData(uint16_t& posX, uint16_t& posY, bool& touching); @@ -75,15 +75,15 @@ bool _hardwareSpi; uint8_t _samplesPerMeasurement; CalibrationMatrix _calibrationMatrix; - uint8_t _cs, _clk, _mosi, _miso; - int8_t _irq; uint16_t _touch_id; #if defined (DM_TOOLCHAIN_ARDUINO) + uint8_t _cs, _clk, _mosi, _miso,_irq;; regtype *_pinDC, *_pinCS, *_pinCLK, *_pinMOSI, *_pinMISO, *_pinIrq; regsize _bitmaskDC, _bitmaskCS, _bitmaskCLK, _bitmaskMOSI, _bitmaskMISO, _bitmaskIrq; uint8_t _spiSettings; #elif defined (DM_TOOLCHAIN_MBED) + PinName _cs, _clk, _mosi, _miso, _irq; DigitalOut *_pinDC, *_pinCS, *_pinCLK, *_pinMOSI, *_led; DigitalIn *_pinMISO, *_pinIrq; SPI *_spi;
DisplayModule 1.8" TFT with SPI Interface
DisplayModule 2.2" TFT with 8-bit interface
DisplayModule 2.8" 240x320 Touch TFT with 8-bit Interface
DisplayModule 2.4" 240x320 Touch TFT with 8-bit Interface
DisplayModule 2.8" 240x320 TFT LCD With Resistive Touch - SPI, 4MB Flash
DisplayModule 3.5" 320x240 TFT LCD With Resistive Touch - SPI, 4MB Flash
DisplayModule 4.3" 480x272 Arduino TFT Shield With Touch And SPI Interface
DisplayModule 5.0" 800x480 Arduino TFT Shield With Touch And SPI Interface
DisplayModule 2.8" 240x320 TFT With Capacitive Touch