Loading...
Searching...
No Matches
cst816s_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Koen Zandberg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
20#ifndef CST816S_PARAMS_H
21#define CST816S_PARAMS_H
22
23#include "board.h"
24#include "cst816s.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34/* I2C configuration */
35#ifndef CST816S_PARAM_I2C_DEV
36#define CST816S_PARAM_I2C_DEV I2C_DEV(0)
37#endif
38
39#ifndef CST816S_PARAM_I2C_ADDR
40#define CST816S_PARAM_I2C_ADDR (0x15)
41#endif
42
43#ifndef CST816S_PARAM_IRQ
44#define CST816S_PARAM_IRQ GPIO_PIN(0, 28)
45#endif
46
47#ifndef CST816S_PARAM_IRQ_FLANK
48#define CST816S_PARAM_IRQ_FLANK GPIO_FALLING
49#endif
50
51#ifndef CST816S_PARAM_RESET
52#define CST816S_PARAM_RESET GPIO_PIN(0, 10)
53#endif
54
55#define CST816S_PARAMS \
56 { \
57 .i2c_dev = CST816S_PARAM_I2C_DEV, \
58 .i2c_addr = CST816S_PARAM_I2C_ADDR, \
59 .irq = CST816S_PARAM_IRQ, \
60 .irq_flank = CST816S_PARAM_IRQ_FLANK, \
61 .reset = CST816S_PARAM_RESET, \
62 }
69{
70 CST816S_PARAMS
71};
72
76#define CST816S_NUMOF ARRAY_SIZE(cst816s_params)
77
81#ifndef CST816S_PARAM_SCREEN_IDS
82#define CST816S_PARAM_SCREEN_IDS 0
83#endif
84
88static const uint8_t cst816s_screen_ids[] =
89{
91};
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* CST816S_PARAMS_H */
Device driver interface for the CST816S touch screen.
#define CST816S_PARAM_SCREEN_IDS
Default screen identifiers.
static const cst816s_params_t cst816s_params[]
Configure CST816S.
static const uint8_t cst816s_screen_ids[]
Configure screen identifiers.
cst816s driver struct
Definition cst816s.h:103