-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
line-flags.js
33 lines (33 loc) · 949 Bytes
/
line-flags.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Line flags are needed to modify the way input behaves, as can be seen in the
* 1.6.x series:
*
* https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/include/gpiod.h?h=v1.6.x#n990
* https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/tests/tests-line.c?h=v1.6.x#n464
*
* It was defined here because from 1.4 to 1.6 version, a few extra values
* appeared and currently node-gyp does not behave well with compile flags.
*
* Also check the index.d.ts for those values under LineFlags type.
*
*/
module.exports = {
get GPIOD_LINE_REQUEST_FLAG_OPEN_DRAIN() {
return 1;
},
get GPIOD_LINE_REQUEST_FLAG_OPEN_SOURCE() {
return 2;
},
get GPIOD_LINE_REQUEST_FLAG_ACTIVE_LOW() {
return 4;
},
get GPIOD_LINE_REQUEST_FLAG_BIAS_DISABLE() {
return 8;
},
get GPIOD_LINE_REQUEST_FLAG_BIAS_PULL_DOWN() {
return 16;
},
get GPIOD_LINE_REQUEST_FLAG_BIAS_PULL_UP() {
return 32;
},
};