image/svg+xml
Brteve's API for EveApps
Version 0.0.1
The reference document for common folder of EveApps project.
 
Loading...
Searching...
No Matches
Gesture.h File Reference

Gesture for touch screen. More...

#include "EVE_CoCmd.h"

Go to the source code of this file.

Data Structures

struct  Gesture_Touch
 

Typedefs

typedef struct Gesture_Touch Gesture_Touch_t
 

Functions

uint8_t Gesture_GetTag (EVE_HalContext *phost)
 Get Active tag number.
 
Gesture_Touch_tGesture_Renew (EVE_HalContext *phost)
 
Gesture_Touch_tGesture_Get ()
 Get gesture data.
 

Detailed Description

Gesture for touch screen.

Author
Tuan Nguyen tuan..nosp@m.nguy.nosp@m.en@br.nosp@m.tchi.nosp@m.p.com
Date
2019

MIT License

Copyright (c) [2019] [Bridgetek Pte Ltd (BRTChip)]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition in file Gesture.h.

Typedef Documentation

◆ Gesture_Touch_t

Function Documentation

◆ Gesture_Get()

Gesture_Touch_t * Gesture_Get ( )

Get gesture data.

Returns
Gesture_Touch_t*

Definition at line 198 of file Gesture.c.

199{
200 return &sGesture;
201}
static Gesture_Touch_t sGesture
Definition Gesture.c:38

◆ Gesture_GetTag()

uint8_t Gesture_GetTag ( EVE_HalContext phost)

Get Active tag number.

Parameters
phostPointer to Hal context
Returns
uint8_t Tag number

Definition at line 140 of file Gesture.c.

141{
142 static uint8_t Read_tag = 0;
143 static uint8_t temp_tag = 0;
144 static uint8_t ret_tag = 0;
145 static uint8_t sk = 0;
146
147 Read_tag = EVE_Hal_rd8(phost, REG_TOUCH_TAG);
148 ret_tag = 0;
149 if (Read_tag != 0) // Allow if the Key is released
150 {
151 if (temp_tag != Read_tag)
152 {
153 temp_tag = Read_tag;
154 sk = Read_tag; // Load the Read tag to temp variable
155 }
156 }
157 else
158 {
159 if (temp_tag != 0)
160 {
161 ret_tag = temp_tag;
162 temp_tag = 0; //The event will be processed. Clear the tag
163 }
164 sk = 0;
165 }
166 return ret_tag;
167}
#define REG_TOUCH_TAG
EVE_HAL_EXPORT uint8_t EVE_Hal_rd8(EVE_HalContext *phost, uint32_t addr)
Read 8 bits from Coprocessor's memory.
Definition EVE_Hal.c:157
unsigned char uint8_t

◆ Gesture_Renew()

Gesture_Touch_t * Gesture_Renew ( EVE_HalContext phost)