/** ****************************************************************************** * File Name : STM32TouchController.cpp ****************************************************************************** * This file is generated by TouchGFX Generator 4.18.1. ****************************************************************************** * @attention * * Copyright (c) 2024 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. * ****************************************************************************** */ /* USER CODE BEGIN STM32TouchController */ #include #include "stm32h745i_touchcontroller.hpp" #include "stm32h745i_discovery_ts.h" //extern I2C_HandleTypeDef hi2c4; void STM32TouchController::init() { STM32H745ITouchController::init(); //initialise touch screen driver by sonam //BSP_TS_Init(Instance, TS_Init); /** * Initialize touch controller and driver * */ } bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y) { /** * By default sampleTouch returns false, * return true if a touch has been detected, otherwise false. * * Coordinates are passed to the caller by reference by x and y. * * This function is called by the TouchGFX framework. * By default sampleTouch is called every tick, this can be adjusted by HAL::setTouchSampleRate(int8_t); * */ return STM32H745ITouchController::sampleTouch(x, y); } /* USER CODE END STM32TouchController */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/