Loading...
Searching...
No Matches
ft5x06_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 Inria
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include <stdint.h>
19
20#include "board.h"
21#include "ft5x06.h"
22#include "ft5x06_constants.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32/* I2C configuration */
33#ifndef FT5X06_PARAM_I2C_DEV
34#define FT5X06_PARAM_I2C_DEV I2C_DEV(0)
35#endif
36#ifndef FT5X06_PARAM_ADDR
37#define FT5X06_PARAM_ADDR (FT5X06_I2C_DEFAULT_ADDRESS)
38#endif
39#ifndef FT5X06_PARAM_INT_PIN
40#define FT5X06_PARAM_INT_PIN GPIO_UNDEF
41#endif
42#ifndef FT5X06_PARAM_XMAX
43#define FT5X06_PARAM_XMAX (480U)
44#endif
45#ifndef FT5X06_PARAM_YMAX
46#define FT5X06_PARAM_YMAX (272U)
47#endif
48#ifndef FT5X06_PARAM_XYCONV
49#define FT5X06_PARAM_XYCONV FT5X06_SWAP_XY
50#endif
51#ifndef FT5X06_PARAM_TYPE
52#define FT5X06_PARAM_TYPE FT5X06_TYPE_FT5336
53#endif
54
55#define FT5X06_PARAMS { \
56 .i2c = FT5X06_PARAM_I2C_DEV, \
57 .addr = FT5X06_PARAM_ADDR, \
58 .int_pin = FT5X06_PARAM_INT_PIN, \
59 .xmax = FT5X06_PARAM_XMAX, \
60 .ymax = FT5X06_PARAM_YMAX, \
61 .xyconv = FT5X06_PARAM_XYCONV, \
62 .type = FT5X06_PARAM_TYPE \
63}
65
70{
71 FT5X06_PARAMS
72};
73
77#ifndef FT5X06_PARAM_SCREEN_IDS
78#define FT5X06_PARAM_SCREEN_IDS 0
79#endif
80
84static const uint8_t ft5x06_screen_ids[] =
85{
87};
88
89#ifdef __cplusplus
90}
91#endif
92
Internal register addresses, bitfields and constants.
#define FT5X06_PARAM_SCREEN_IDS
Default screen identifiers.
static const uint8_t ft5x06_screen_ids[]
Configure screen identifiers.
static const ft5x06_params_t ft5x06_params[]
Configuration struct.
Device initialization parameters.
Definition ft5x06.h:113