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