Select one of the symbols to view example projects that use it.
 
Outline
#include <ResistiveTouchController.hpp>
#include "stm32f429i_discovery_ts.h"
touchgfx::ResistiveTouchController::init()
touchgfx::ResistiveTouchController::sampleTouch(int32_t &, int32_t &)
Files
loading...
CodeScopeSTM32 Libraries and SamplesTouchGFXGui/target/ResistiveTouchController.cpp
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * This file is part of the TouchGFX 4.10.0 distribution. * * @attention * * Copyright (c) 2018 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ #include <ResistiveTouchController.hpp> extern "C" { #include "stm32f429i_discovery_ts.h" uint32_t LCD_GetXSize(); uint32_t LCD_GetYSize(); }extern "C" { ... } using namespace touchgfx; void ResistiveTouchController::init() { BSP_TS_Init(LCD_GetXSize(), LCD_GetYSize()); }{ ... } bool ResistiveTouchController::sampleTouch(int32_t& x, int32_t& y) { TS_StateTypeDef state; BSP_TS_GetState(&state); if (state.TouchDetected) { x = state.X; y = state.Y; return true; }if (state.TouchDetected) { ... } return false; }{ ... }