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
9#pragma once
10
20
21#include <stdint.h>
22
23#include "board.h"
24#include "ft5x06.h"
25#include "ft5x06_constants.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35/* I2C configuration */
36#ifndef FT5X06_PARAM_I2C_DEV
37#define FT5X06_PARAM_I2C_DEV I2C_DEV(0)
38#endif
39#ifndef FT5X06_PARAM_ADDR
40#define FT5X06_PARAM_ADDR (FT5X06_I2C_DEFAULT_ADDRESS)
41#endif
42#ifndef FT5X06_PARAM_INT_PIN
43#define FT5X06_PARAM_INT_PIN GPIO_UNDEF
44#endif
45#ifndef FT5X06_PARAM_XMAX
46#define FT5X06_PARAM_XMAX (480U)
47#endif
48#ifndef FT5X06_PARAM_YMAX
49#define FT5X06_PARAM_YMAX (272U)
50#endif
51#ifndef FT5X06_PARAM_XYCONV
52#define FT5X06_PARAM_XYCONV FT5X06_SWAP_XY
53#endif
54#ifndef FT5X06_PARAM_TYPE
55#define FT5X06_PARAM_TYPE FT5X06_TYPE_FT5336
56#endif
57
58#define FT5X06_PARAMS { \
59 .i2c = FT5X06_PARAM_I2C_DEV, \
60 .addr = FT5X06_PARAM_ADDR, \
61 .int_pin = FT5X06_PARAM_INT_PIN, \
62 .xmax = FT5X06_PARAM_XMAX, \
63 .ymax = FT5X06_PARAM_YMAX, \
64 .xyconv = FT5X06_PARAM_XYCONV, \
65 .type = FT5X06_PARAM_TYPE \
66}
68
73{
74 FT5X06_PARAMS
75};
76
80#ifndef FT5X06_PARAM_SCREEN_IDS
81#define FT5X06_PARAM_SCREEN_IDS 0
82#endif
83
87static const uint8_t ft5x06_screen_ids[] =
88{
90};
91
92#ifdef __cplusplus
93}
94#endif
95
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