WebRadioApp  0.1
ew_bsp_touch.c File Reference

This file is part of the interface (glue layer) between an Embedded Wizard generated UI application and the board support package (BSP) of a dedicated target. Please note: The implementation of this module is partially based on examples that are provided within the STM32 cube firmware. In case you want to adapt this module to your custom specific hardware, please adapt the hardware initialization code according your needs or integrate the generated initialization code created by using the tool CubeMX. This template is responsible to initialize the touch driver of the display hardware and to receive the touch events for the UI application. More...

#include "ewconfig.h"
#include "string.h"
#include "stm32h7xx_hal.h"
#include "stm32h747i_discovery.h"
#include "stm32h747i_discovery_bus.h"
#include "ft6x06.h"
#include "ewrte.h"
#include "ew_bsp_clock.h"
#include "ew_bsp_touch.h"
Include dependency graph for ew_bsp_touch.c:

Data Structures

struct  XTouchData
 

Macros

#define TS_I2C_ADDRESS   0x70U
 
#define NO_OF_FINGERS   FT6X06_MAX_NB_TOUCH
 
#define DELTA_TOUCH   16
 
#define DELTA_TIME   500
 
#define EW_BSP_TOUCH_IDLE   0
 
#define EW_BSP_TOUCH_HOLD   4
 

Functions

void EwBspTouchInit (int aWidth, int aHeight)
 Initializes the touch driver. More...
 
void EwBspTouchDone (void)
 Terminates the touch driver. More...
 
int EwBspTouchGetEvents (XTouchEvent **aTouchEvent)
 The function EwBspTouchGetEvents reads the current touch positions from the touch driver and returns the current touch position and touch status of the different fingers. The returned number of touch events indicates the number of XTouchEvent that contain position and status information. The orientation of the touch positions is adjusted to match GUI coordinates. If the hardware supports only single touch, the finger number is always 0. More...
 

Variables

static int TouchAreaWidth = 0
 
static int TouchAreaHeight = 0
 
static XTouchEvent TouchEvent [NO_OF_FINGERS]
 
static XTouchData TouchData [NO_OF_FINGERS]
 
static FT6X06_Object_t FT6X06Obj
 

Detailed Description

This file is part of the interface (glue layer) between an Embedded Wizard generated UI application and the board support package (BSP) of a dedicated target. Please note: The implementation of this module is partially based on examples that are provided within the STM32 cube firmware. In case you want to adapt this module to your custom specific hardware, please adapt the hardware initialization code according your needs or integrate the generated initialization code created by using the tool CubeMX. This template is responsible to initialize the touch driver of the display hardware and to receive the touch events for the UI application.

Author
Kevin Bello (k.bel.nosp@m.lo@t.nosp@m.um.de)
Version
0.1
Date
2021-04-17