Loading...
Searching...
No Matches
cst816s_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Koen Zandberg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "board.h"
20#include "cst816s.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30/* I2C configuration */
31#ifndef CST816S_PARAM_I2C_DEV
32#define CST816S_PARAM_I2C_DEV I2C_DEV(0)
33#endif
34
35#ifndef CST816S_PARAM_I2C_ADDR
36#define CST816S_PARAM_I2C_ADDR (0x15)
37#endif
38
39#ifndef CST816S_PARAM_IRQ
40#define CST816S_PARAM_IRQ GPIO_PIN(0, 28)
41#endif
42
43#ifndef CST816S_PARAM_IRQ_FLANK
44#define CST816S_PARAM_IRQ_FLANK GPIO_FALLING
45#endif
46
47#ifndef CST816S_PARAM_RESET
48#define CST816S_PARAM_RESET GPIO_PIN(0, 10)
49#endif
50
51#define CST816S_PARAMS \
52 { \
53 .i2c_dev = CST816S_PARAM_I2C_DEV, \
54 .i2c_addr = CST816S_PARAM_I2C_ADDR, \
55 .irq = CST816S_PARAM_IRQ, \
56 .irq_flank = CST816S_PARAM_IRQ_FLANK, \
57 .reset = CST816S_PARAM_RESET, \
58 }
60
65{
66 CST816S_PARAMS
67};
68
72#define CST816S_NUMOF ARRAY_SIZE(cst816s_params)
73
77#ifndef CST816S_PARAM_SCREEN_IDS
78#define CST816S_PARAM_SCREEN_IDS 0
79#endif
80
84static const uint8_t cst816s_screen_ids[] =
85{
87};
88
89#ifdef __cplusplus
90}
91#endif
92
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