Project

Committer:
60010649
Date:
Tue May 14 15:52:56 2019 +0000
Revision:
1:52f6acfbc04f
Parent:
0:fe0cf5e2960f
Project MIM instrument PAD

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:fe0cf5e2960f 1 /* Copyright (c) 2010-2011 mbed.org, MIT License
bcostm 0:fe0cf5e2960f 2 *
bcostm 0:fe0cf5e2960f 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
bcostm 0:fe0cf5e2960f 4 * and associated documentation files (the "Software"), to deal in the Software without
bcostm 0:fe0cf5e2960f 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
bcostm 0:fe0cf5e2960f 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
bcostm 0:fe0cf5e2960f 7 * Software is furnished to do so, subject to the following conditions:
bcostm 0:fe0cf5e2960f 8 *
bcostm 0:fe0cf5e2960f 9 * The above copyright notice and this permission notice shall be included in all copies or
bcostm 0:fe0cf5e2960f 10 * substantial portions of the Software.
bcostm 0:fe0cf5e2960f 11 *
bcostm 0:fe0cf5e2960f 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
bcostm 0:fe0cf5e2960f 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
bcostm 0:fe0cf5e2960f 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
bcostm 0:fe0cf5e2960f 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
bcostm 0:fe0cf5e2960f 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
bcostm 0:fe0cf5e2960f 17 */
bcostm 0:fe0cf5e2960f 18
bcostm 0:fe0cf5e2960f 19 #include "TS_DISCO_F746NG.h"
bcostm 0:fe0cf5e2960f 20
bcostm 0:fe0cf5e2960f 21 // Constructor
bcostm 0:fe0cf5e2960f 22 TS_DISCO_F746NG::TS_DISCO_F746NG()
bcostm 0:fe0cf5e2960f 23 {
bcostm 0:fe0cf5e2960f 24 BSP_TS_Init(100, 100);
bcostm 0:fe0cf5e2960f 25 }
bcostm 0:fe0cf5e2960f 26
bcostm 0:fe0cf5e2960f 27 // Destructor
bcostm 0:fe0cf5e2960f 28 TS_DISCO_F746NG::~TS_DISCO_F746NG()
bcostm 0:fe0cf5e2960f 29 {
bcostm 0:fe0cf5e2960f 30 BSP_TS_DeInit();
bcostm 0:fe0cf5e2960f 31 }
bcostm 0:fe0cf5e2960f 32
bcostm 0:fe0cf5e2960f 33 //=================================================================================================================
bcostm 0:fe0cf5e2960f 34 // Public methods
bcostm 0:fe0cf5e2960f 35 //=================================================================================================================
bcostm 0:fe0cf5e2960f 36
bcostm 0:fe0cf5e2960f 37 uint8_t TS_DISCO_F746NG::Init(uint16_t ts_SizeX, uint16_t ts_SizeY)
bcostm 0:fe0cf5e2960f 38 {
bcostm 0:fe0cf5e2960f 39 return BSP_TS_Init(ts_SizeX, ts_SizeY);
bcostm 0:fe0cf5e2960f 40 }
bcostm 0:fe0cf5e2960f 41
bcostm 0:fe0cf5e2960f 42 uint8_t TS_DISCO_F746NG::DeInit(void)
bcostm 0:fe0cf5e2960f 43 {
bcostm 0:fe0cf5e2960f 44 return BSP_TS_DeInit();
bcostm 0:fe0cf5e2960f 45 }
bcostm 0:fe0cf5e2960f 46
bcostm 0:fe0cf5e2960f 47 uint8_t TS_DISCO_F746NG::ITConfig(void)
bcostm 0:fe0cf5e2960f 48 {
bcostm 0:fe0cf5e2960f 49 return BSP_TS_ITConfig();
bcostm 0:fe0cf5e2960f 50 }
bcostm 0:fe0cf5e2960f 51
bcostm 0:fe0cf5e2960f 52 uint8_t TS_DISCO_F746NG::ITGetStatus(void)
bcostm 0:fe0cf5e2960f 53 {
bcostm 0:fe0cf5e2960f 54 return BSP_TS_ITGetStatus();
bcostm 0:fe0cf5e2960f 55 }
bcostm 0:fe0cf5e2960f 56
bcostm 0:fe0cf5e2960f 57 uint8_t TS_DISCO_F746NG::GetState(TS_StateTypeDef *TS_State)
bcostm 0:fe0cf5e2960f 58 {
bcostm 0:fe0cf5e2960f 59 return BSP_TS_GetState(TS_State);
bcostm 0:fe0cf5e2960f 60 }
bcostm 0:fe0cf5e2960f 61
bcostm 0:fe0cf5e2960f 62 uint8_t TS_DISCO_F746NG::Get_GestureId(TS_StateTypeDef *TS_State)
bcostm 0:fe0cf5e2960f 63 {
bcostm 0:fe0cf5e2960f 64 return BSP_TS_Get_GestureId(TS_State);
bcostm 0:fe0cf5e2960f 65 }
bcostm 0:fe0cf5e2960f 66
bcostm 0:fe0cf5e2960f 67 void TS_DISCO_F746NG::ITClear(void)
bcostm 0:fe0cf5e2960f 68 {
bcostm 0:fe0cf5e2960f 69 BSP_TS_ITClear();
bcostm 0:fe0cf5e2960f 70 }
bcostm 0:fe0cf5e2960f 71
bcostm 0:fe0cf5e2960f 72 uint8_t TS_DISCO_F746NG::ResetTouchData(TS_StateTypeDef *TS_State)
bcostm 0:fe0cf5e2960f 73 {
bcostm 0:fe0cf5e2960f 74 return BSP_TS_ResetTouchData(TS_State);
bcostm 0:fe0cf5e2960f 75 }
bcostm 0:fe0cf5e2960f 76
bcostm 0:fe0cf5e2960f 77 //=================================================================================================================
bcostm 0:fe0cf5e2960f 78 // Private methods
bcostm 0:fe0cf5e2960f 79 //=================================================================================================================