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.
Dependencies: FTPClient SDFileSystem SeeedStudioTFTv2 TFT_fonts WIZnetInterface mbed
MySeeedStudioTFTv2.h@2:c069ab35d315, 2015-08-26 (annotated)
- Committer:
- MidnightCow
- Date:
- Wed Aug 26 13:55:29 2015 +0000
- Revision:
- 2:c069ab35d315
- Parent:
- 0:583a42b8d940
Replace FTPClient
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| MidnightCow | 0:583a42b8d940 | 1 | /* mbed library for touchscreen connected to 4 mbed pins |
| MidnightCow | 0:583a42b8d940 | 2 | * derive from SPI_TFT lib |
| MidnightCow | 0:583a42b8d940 | 3 | * Copyright (c) 2011 Peter Drescher - DC2PD |
| MidnightCow | 0:583a42b8d940 | 4 | * |
| MidnightCow | 0:583a42b8d940 | 5 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| MidnightCow | 0:583a42b8d940 | 6 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| MidnightCow | 0:583a42b8d940 | 7 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| MidnightCow | 0:583a42b8d940 | 8 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| MidnightCow | 0:583a42b8d940 | 9 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| MidnightCow | 0:583a42b8d940 | 10 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| MidnightCow | 0:583a42b8d940 | 11 | * THE SOFTWARE. |
| MidnightCow | 0:583a42b8d940 | 12 | */ |
| MidnightCow | 0:583a42b8d940 | 13 | |
| MidnightCow | 0:583a42b8d940 | 14 | #ifndef MYMBED_TOUCH_H |
| MidnightCow | 0:583a42b8d940 | 15 | #define MYMBED_TOUCH_H |
| MidnightCow | 0:583a42b8d940 | 16 | |
| MidnightCow | 0:583a42b8d940 | 17 | #include "mbed.h" |
| MidnightCow | 0:583a42b8d940 | 18 | |
| MidnightCow | 0:583a42b8d940 | 19 | #include "SeeedStudioTFTv2.h" |
| MidnightCow | 0:583a42b8d940 | 20 | #ifndef USE_SDCARD |
| MidnightCow | 0:583a42b8d940 | 21 | #error "Shoud be defined USE_SDCARD in SeeedStudioTFTv2.0.h |
| MidnightCow | 0:583a42b8d940 | 22 | #endif |
| MidnightCow | 0:583a42b8d940 | 23 | |
| MidnightCow | 0:583a42b8d940 | 24 | |
| MidnightCow | 0:583a42b8d940 | 25 | class MySeeedStudioTFTv2 : public SeeedStudioTFTv2 |
| MidnightCow | 0:583a42b8d940 | 26 | { |
| MidnightCow | 0:583a42b8d940 | 27 | public: |
| MidnightCow | 0:583a42b8d940 | 28 | /** create a TFT with touch object connected to the pins: |
| MidnightCow | 0:583a42b8d940 | 29 | * |
| MidnightCow | 0:583a42b8d940 | 30 | * @param pin xp resistiv touch x+ |
| MidnightCow | 0:583a42b8d940 | 31 | * @param pin xm resistiv touch x- |
| MidnightCow | 0:583a42b8d940 | 32 | * @param pin yp resistiv touch y+ |
| MidnightCow | 0:583a42b8d940 | 33 | * @param pin ym resistiv touch y- |
| MidnightCow | 0:583a42b8d940 | 34 | * @param mosi,miso,sclk SPI connection to TFT |
| MidnightCow | 0:583a42b8d940 | 35 | * @param cs pin connected to CS of display |
| MidnightCow | 0:583a42b8d940 | 36 | * @param reset pin connected to RESET of display |
| MidnightCow | 0:583a42b8d940 | 37 | * based on my SPI_TFT lib |
| MidnightCow | 0:583a42b8d940 | 38 | */ |
| MidnightCow | 0:583a42b8d940 | 39 | MySeeedStudioTFTv2(PinName xp, PinName xm, PinName yp, PinName ym, |
| MidnightCow | 0:583a42b8d940 | 40 | PinName mosi, PinName miso, PinName sclk, |
| MidnightCow | 0:583a42b8d940 | 41 | PinName csTft, PinName dcTft, PinName blTft, |
| MidnightCow | 0:583a42b8d940 | 42 | PinName csSd); |
| MidnightCow | 0:583a42b8d940 | 43 | |
| MidnightCow | 0:583a42b8d940 | 44 | int DrawBitmapFile(FILE * fp); |
| MidnightCow | 0:583a42b8d940 | 45 | }; |
| MidnightCow | 0:583a42b8d940 | 46 | |
| MidnightCow | 0:583a42b8d940 | 47 | #endif |