VSF Documented
vsf_input_cst8.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_INPUT_CST8_H__
19#define __VSF_INPUT_CST8_H__
20
21/* Driver for CST8 series from Hynitron Microelectronics */
22
23/*============================ INCLUDES ======================================*/
24
26
27#if VSF_USE_INPUT == ENABLED && VSF_INPUT_USE_CST8 == ENABLED
28
29#include "hal/vsf_hal.h"
30
31#if defined(__VSF_INPUT_CST8_CLASS_IMPLEMENT)
32# undef __VSF_INPUT_CST8_CLASS_IMPLEMENT
33# define __VSF_CLASS_IMPLEMENT__
34#endif
35
36#include "utilities/ooc_class.h"
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/*============================ MACROS ========================================*/
43
44#if VSF_HAL_USE_I2C != ENABLED
45# error Touch Screen chip CST8 series need I2C enabled
46#endif
47
48/*============================ MACROFIED FUNCTIONS ===========================*/
49/*============================ TYPES =========================================*/
50
52 public_member(
53 union {
54 vsf_i2c_regacc_t regacc;
56 };
57
58 vsf_gpio_t *gpio_int_port;
59 uint8_t gpio_int_pin_idx;
60
61 uint16_t width;
62 uint16_t height;
63 )
64 private_member(
65 union {
66 struct {
67 uint8_t dummy;
68 uint8_t getture_id;
69 uint8_t finger_num;
70 uint8_t xpos_h;
71 uint8_t xpos_l;
72 uint8_t ypos_h;
73 uint8_t ypos_l;
74 };
75 uint8_t buffer[7];
76 };
77 vsf_arch_prio_t prio;
78 )
79};
80
81/*============================ GLOBAL VARIABLES ==============================*/
82/*============================ PROTOTYPES ====================================*/
83
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif // VSF_USE_INPUT && VSF_INPUT_USE_HID
91#endif // __VSF_INPUT_HID_H__
vsf_err_t
Definition __type.h:42
Definition vsf_input_cst8.h:51
Definition vsf_i2c_util.h:42
vsf_arch_prio_t
Definition cortex_a_generic.h:88
#define vsf_class(__name)
Definition ooc_class.h:48
unsigned short uint16_t
Definition stdint.h:7
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_template_gpio.h:471
vsf_err_t vk_input_cst8_init(vk_input_cst8_t *csr8, vsf_arch_prio_t prio)
Definition vsf_input_cst8.c:105