Loading...
Searching...
No Matches
ft5x06_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Inria
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
19#ifndef FT5X06_PARAMS_H
20#define FT5X06_PARAMS_H
21
22#include <stdint.h>
23
24#include "board.h"
25#include "ft5x06.h"
26#include "ft5x06_constants.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36/* I2C configuration */
37#ifndef FT5X06_PARAM_I2C_DEV
38#define FT5X06_PARAM_I2C_DEV I2C_DEV(0)
39#endif
40#ifndef FT5X06_PARAM_ADDR
41#define FT5X06_PARAM_ADDR (FT5X06_I2C_DEFAULT_ADDRESS)
42#endif
43#ifndef FT5X06_PARAM_INT_PIN
44#define FT5X06_PARAM_INT_PIN GPIO_UNDEF
45#endif
46#ifndef FT5X06_PARAM_XMAX
47#define FT5X06_PARAM_XMAX (480U)
48#endif
49#ifndef FT5X06_PARAM_YMAX
50#define FT5X06_PARAM_YMAX (272U)
51#endif
52#ifndef FT5X06_PARAM_XYCONV
53#define FT5X06_PARAM_XYCONV FT5X06_SWAP_XY
54#endif
55#ifndef FT5X06_PARAM_TYPE
56#define FT5X06_PARAM_TYPE FT5X06_TYPE_FT5336
57#endif
58
59#define FT5X06_PARAMS { \
60 .i2c = FT5X06_PARAM_I2C_DEV, \
61 .addr = FT5X06_PARAM_ADDR, \
62 .int_pin = FT5X06_PARAM_INT_PIN, \
63 .xmax = FT5X06_PARAM_XMAX, \
64 .ymax = FT5X06_PARAM_YMAX, \
65 .xyconv = FT5X06_PARAM_XYCONV, \
66 .type = FT5X06_PARAM_TYPE \
67}
74{
75 FT5X06_PARAMS
76};
77
81#ifndef FT5X06_PARAM_SCREEN_IDS
82#define FT5X06_PARAM_SCREEN_IDS 0
83#endif
84
88static const uint8_t ft5x06_screen_ids[] =
89{
91};
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* FT5X06_PARAMS_H */
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:114