This class drives the touch screen module of the LCD display present on DISCO_F469NI board.
Dependents: DISCO-F469NI_LCDTS_GUI_demo Configurable_Robots DISCO-F469NI_LCDTS_demo DISCO-F469NI_LCDTS_demo ... more
TS_DISCO_F469NI.cpp@0:ee8fa51422c7, 2015-12-18 (annotated)
- Committer:
- bcostm
- Date:
- Fri Dec 18 09:06:26 2015 +0000
- Revision:
- 0:ee8fa51422c7
Initial version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bcostm | 0:ee8fa51422c7 | 1 | /* Copyright (c) 2010-2011 mbed.org, MIT License |
bcostm | 0:ee8fa51422c7 | 2 | * |
bcostm | 0:ee8fa51422c7 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
bcostm | 0:ee8fa51422c7 | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
bcostm | 0:ee8fa51422c7 | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
bcostm | 0:ee8fa51422c7 | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
bcostm | 0:ee8fa51422c7 | 7 | * Software is furnished to do so, subject to the following conditions: |
bcostm | 0:ee8fa51422c7 | 8 | * |
bcostm | 0:ee8fa51422c7 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
bcostm | 0:ee8fa51422c7 | 10 | * substantial portions of the Software. |
bcostm | 0:ee8fa51422c7 | 11 | * |
bcostm | 0:ee8fa51422c7 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
bcostm | 0:ee8fa51422c7 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
bcostm | 0:ee8fa51422c7 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
bcostm | 0:ee8fa51422c7 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
bcostm | 0:ee8fa51422c7 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
bcostm | 0:ee8fa51422c7 | 17 | */ |
bcostm | 0:ee8fa51422c7 | 18 | |
bcostm | 0:ee8fa51422c7 | 19 | #include "TS_DISCO_F469NI.h" |
bcostm | 0:ee8fa51422c7 | 20 | |
bcostm | 0:ee8fa51422c7 | 21 | // Constructor |
bcostm | 0:ee8fa51422c7 | 22 | TS_DISCO_F469NI::TS_DISCO_F469NI() |
bcostm | 0:ee8fa51422c7 | 23 | { |
bcostm | 0:ee8fa51422c7 | 24 | BSP_TS_Init(100, 100); |
bcostm | 0:ee8fa51422c7 | 25 | } |
bcostm | 0:ee8fa51422c7 | 26 | |
bcostm | 0:ee8fa51422c7 | 27 | // Destructor |
bcostm | 0:ee8fa51422c7 | 28 | TS_DISCO_F469NI::~TS_DISCO_F469NI() |
bcostm | 0:ee8fa51422c7 | 29 | { |
bcostm | 0:ee8fa51422c7 | 30 | |
bcostm | 0:ee8fa51422c7 | 31 | } |
bcostm | 0:ee8fa51422c7 | 32 | |
bcostm | 0:ee8fa51422c7 | 33 | //================================================================================================================= |
bcostm | 0:ee8fa51422c7 | 34 | // Public methods |
bcostm | 0:ee8fa51422c7 | 35 | //================================================================================================================= |
bcostm | 0:ee8fa51422c7 | 36 | |
bcostm | 0:ee8fa51422c7 | 37 | uint8_t TS_DISCO_F469NI::Init(uint16_t ts_SizeX, uint16_t ts_SizeY) |
bcostm | 0:ee8fa51422c7 | 38 | { |
bcostm | 0:ee8fa51422c7 | 39 | return BSP_TS_Init(ts_SizeX, ts_SizeY); |
bcostm | 0:ee8fa51422c7 | 40 | } |
bcostm | 0:ee8fa51422c7 | 41 | |
bcostm | 0:ee8fa51422c7 | 42 | uint8_t TS_DISCO_F469NI::ITConfig(void) |
bcostm | 0:ee8fa51422c7 | 43 | { |
bcostm | 0:ee8fa51422c7 | 44 | return BSP_TS_ITConfig(); |
bcostm | 0:ee8fa51422c7 | 45 | } |
bcostm | 0:ee8fa51422c7 | 46 | |
bcostm | 0:ee8fa51422c7 | 47 | uint8_t TS_DISCO_F469NI::GetState(TS_StateTypeDef *TS_State) |
bcostm | 0:ee8fa51422c7 | 48 | { |
bcostm | 0:ee8fa51422c7 | 49 | return BSP_TS_GetState(TS_State); |
bcostm | 0:ee8fa51422c7 | 50 | } |
bcostm | 0:ee8fa51422c7 | 51 | |
bcostm | 0:ee8fa51422c7 | 52 | #if (TS_MULTI_TOUCH_SUPPORTED == 1) |
bcostm | 0:ee8fa51422c7 | 53 | |
bcostm | 0:ee8fa51422c7 | 54 | uint8_t TS_DISCO_F469NI::Get_GestureId(TS_StateTypeDef *TS_State) |
bcostm | 0:ee8fa51422c7 | 55 | { |
bcostm | 0:ee8fa51422c7 | 56 | return BSP_TS_Get_GestureId(TS_State); |
bcostm | 0:ee8fa51422c7 | 57 | } |
bcostm | 0:ee8fa51422c7 | 58 | |
bcostm | 0:ee8fa51422c7 | 59 | uint8_t TS_DISCO_F469NI::ResetTouchData(TS_StateTypeDef *TS_State) |
bcostm | 0:ee8fa51422c7 | 60 | { |
bcostm | 0:ee8fa51422c7 | 61 | return BSP_TS_ResetTouchData(TS_State); |
bcostm | 0:ee8fa51422c7 | 62 | } |
bcostm | 0:ee8fa51422c7 | 63 | |
bcostm | 0:ee8fa51422c7 | 64 | #endif // (TS_MULTI_TOUCH_SUPPORTED == 1) |
bcostm | 0:ee8fa51422c7 | 65 | |
bcostm | 0:ee8fa51422c7 | 66 | //================================================================================================================= |
bcostm | 0:ee8fa51422c7 | 67 | // Private methods |
bcostm | 0:ee8fa51422c7 | 68 | //================================================================================================================= |