Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
lpc11u6x-pinctrl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Seagate Technology LLC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_LPC11U6X_PINCTRL_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_LPC11U6X_PINCTRL_H_
9
52#define IOCON_FUNC0 0
53#define IOCON_FUNC1 1
54#define IOCON_FUNC2 2
55#define IOCON_FUNC3 3
56#define IOCON_FUNC4 4
57#define IOCON_FUNC5 5
58
59#define IOCON_MODE_INACT (0 << 3) /* No pull resistor. */
60#define IOCON_MODE_PULLDOWN (1 << 3) /* Enable pull-down resistor. */
61#define IOCON_MODE_PULLUP (2 << 3) /* Enable Pull-up resistor. */
62#define IOCON_MODE_REPEATER (3 << 3) /* Repeater mode. */
63
64#define IOCON_HYS_EN (1 << 5) /* Enable hysteresis. */
65
66#define IOCON_INV_EN (1 << 6) /* Invert input polarity. */
67
68/* Only for analog pins. */
69#define IOCON_ADMODE_EN (0 << 7) /* Enable analog input mode. */
70#define IOCON_DIGMODE_EN (1 << 7) /* Enable digital I/O mode. */
71#define IOCON_FILTR_DIS (1 << 8) /* Disable noise filtering. */
72
73/* Only for open-drain pins (I2C). */
74#define IOCON_SFI2C_EN (0 << 8) /* I2C standard mode / Fast-mode. */
75#define IOCON_STDI2C_EN (1 << 8) /* GPIO functionality. */
76#define IOCON_FASTI2C_EN (2 << 8) /* I2C Fast-mode Plus. */
77
78#define IOCON_OPENDRAIN_EN (1 << 10) /* Enable open-drain mode. */
79
80/*
81 * The digital filter mode allows to discard input pulses shorter than
82 * 1, 2 or 3 clock cycles.
83 */
84#define IOCON_S_MODE_0CLK (0 << 11) /* No input filter. */
85#define IOCON_S_MODE_1CLK (1 << 11)
86#define IOCON_S_MODE_2CLK (2 << 11)
87#define IOCON_S_MODE_3CLK (3 << 11)
88
89/*
90 * Clock divisor.
91 */
92#define IOCON_CLKDIV0 (0 << 13)
93#define IOCON_CLKDIV1 (1 << 13)
94#define IOCON_CLKDIV2 (2 << 13)
95#define IOCON_CLKDIV3 (3 << 13)
96#define IOCON_CLKDIV4 (4 << 13)
97#define IOCON_CLKDIV5 (5 << 13)
98#define IOCON_CLKDIV6 (6 << 13)
99
100#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_LPC11U6X_PINCTRL_H_ */