Demo to control 4 LEDs
Dependencies: BSP_DISCO_F469NI mbed
Diff: TS_F469/TS_F469.cpp
- Revision:
- 0:e06404fdff2f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TS_F469/TS_F469.cpp Wed Oct 11 22:26:45 2017 +0000 @@ -0,0 +1,29 @@ +/* + * TS_F469.cpp + * + * Copyright 2017 Faberge@TsarTeam + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include "TS_F469.h" + +TouchScreen :: TouchScreen() +{ + BSP_TS_Init(DIMX, DIMY); +} + +bool TouchScreen :: getState() +{ + BSP_TS_GetState(&TS_State); + return static_cast<bool>(TS_State.touchDetected); +}