H753_CPP_SPI_Resistive_Touch_Screen_Controller 1.0
STM32H753 SPI resistive touchscreen (Adafruit 333 overlay + 5767 TSC2046 controller) driver and tutorial
Loading...
Searching...
No Matches
entryPointCPP.hpp
Go to the documentation of this file.
1
20#ifndef INC_ENTRYPOINTCPP_HPP_
21#define INC_ENTRYPOINTCPP_HPP_
22
23#include "main.h"
24#include "stdbool.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
37void initTSC2046(void);
38
45bool tsc2046IsReady(void);
46
60bool tsc2046GetPoint(int16_t *x, int16_t *y, float *pressure);
61
66bool tsc2046IsTouched(void);
67
75void tsc2046EnableInterrupts(bool enable);
76
83void tsc2046SetVRef(float vref);
84
91void tsc2046SetTouchedThreshold(float touchedThresholdOhms);
92
99bool tsc2046ReadTemperatureC(float *celsius);
100
107bool tsc2046ReadBatteryVoltage(float *volts);
108
115bool tsc2046ReadAuxiliaryVoltage(float *volts);
116
117#ifdef __cplusplus
118}
119#endif
120
121#endif /* INC_ENTRYPOINTCPP_HPP_ */
void initTSC2046(void)
Constructs the TSC2046 driver. Must be called after MX_SPI1_Init() (and therefore after HAL_Init()/Sy...
bool tsc2046ReadBatteryVoltage(float *volts)
Reads the voltage on the VBAT pin.
void tsc2046SetVRef(float vref)
Sets the voltage connected to the TSC2046's VRef pin, if any.
bool tsc2046IsReady(void)
Reports whether initTSC2046() has run. Every other tsc2046* function below returns false without touc...
void tsc2046SetTouchedThreshold(float touchedThresholdOhms)
Sets the pressure threshold used by tsc2046IsTouched().
bool tsc2046GetPoint(int16_t *x, int16_t *y, float *pressure)
Reads the current touch position and pressure.
bool tsc2046ReadAuxiliaryVoltage(float *volts)
Reads the voltage on the AUX pin.
bool tsc2046ReadTemperatureC(float *celsius)
Reads the current temperature.
bool tsc2046IsTouched(void)
Determines if the touchscreen is currently being touched.
void tsc2046EnableInterrupts(bool enable)
Enables or disables the TSC2046's own touch interrupt (IRQ pin pulled low on touch)....
: Header for main.c file. This file contains the common defines of the application.