1 /* 2 * Copyright (c) 2006-2022, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef __DT_BINDINGS_PIN_PIN_H__ 8 #define __DT_BINDINGS_PIN_PIN_H__ 9 10 /* Bit 0 express polarity */ 11 #define PIN_ACTIVE_HIGH 0 12 #define PIN_ACTIVE_LOW 1 13 14 /* Bit 1 express single-endedness */ 15 #define PIN_PUSH_PULL 0 16 #define PIN_SINGLE_ENDED 2 17 18 /* Bit 2 express Open drain or open source */ 19 #define PIN_LINE_OPEN_SOURCE 0 20 #define PIN_LINE_OPEN_DRAIN 4 21 22 /* 23 * Open Drain/Collector is the combination of single-ended open drain interface. 24 * Open Source/Emitter is the combination of single-ended open source interface. 25 */ 26 #define PIN_OPEN_DRAIN (PIN_SINGLE_ENDED | PIN_LINE_OPEN_DRAIN) 27 #define PIN_OPEN_SOURCE (PIN_SINGLE_ENDED | PIN_LINE_OPEN_SOURCE) 28 29 /* Bit 3 express PIN suspend/resume and reset persistence */ 30 #define PIN_PERSISTENT 0 31 #define PIN_TRANSITORY 8 32 33 /* Bit 4 express pull up */ 34 #define PIN_PULL_UP 16 35 36 /* Bit 5 express pull down */ 37 #define PIN_PULL_DOWN 32 38 39 /* Bit 6 express pull disable */ 40 #define PIN_PULL_DISABLE 64 41 42 #endif /* __DT_BINDINGS_PIN_PIN_H__ */ 43