test public
Dependencies: HttpServer_snapshot_mbed-os
TouchKey_7_1inch.h
00001 /* mbed Microcontroller Library 00002 * Copyright (C) 2016 Renesas Electronics Corporation. All rights reserved. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 /**************************************************************************//** 00017 * @file TouchKey_7_1inch.h 00018 * @brief TouchKey_7_1inch API 00019 ******************************************************************************/ 00020 00021 #ifndef TOUCH_KEY_7_1INCH_H 00022 #define TOUCH_KEY_7_1INCH_H 00023 00024 #include "TouchKey.h" 00025 00026 /** 00027 * The class to acquire touch coordinates. (GR-PEACH 7.1inch LCD Shield edition) 00028 */ 00029 class TouchKey_7_1inch : public TouchKey { 00030 00031 public: 00032 00033 /** Create a TouchKey_7_1inch object 00034 * 00035 * @param sda I2C data line pin 00036 * @param scl I2C clock line pin 00037 * @param tprst tprst pin 00038 * @param tpint tpint pin 00039 */ 00040 TouchKey_7_1inch(PinName tprst, PinName tpint, PinName sda = I2C_SDA, PinName scl = I2C_SCL); 00041 00042 virtual int GetMaxTouchNum(void); 00043 virtual int GetCoordinates(int touch_buff_num, touch_pos_t * p_touch); 00044 00045 private: 00046 typedef struct { 00047 uint8_t y_h: 3, 00048 reserved: 1, 00049 x_h: 3, 00050 valid: 1; 00051 uint8_t x_l; 00052 uint8_t y_l; 00053 uint8_t z; 00054 } xyz_data_t; 00055 00056 typedef struct { 00057 uint8_t fingers: 4, 00058 reserved: 4; 00059 uint8_t keys; 00060 xyz_data_t xyz_data[2]; 00061 } stx_report_data_t; 00062 00063 I2C i2c; 00064 }; 00065 00066 00067 #endif
Generated on Wed Jul 13 2022 05:33:37 by 1.7.2