forked from okitavera/goodix-fod-wakeup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwakeup.h
44 lines (37 loc) · 1.24 KB
/
wakeup.h
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
34
35
36
37
38
39
40
41
42
43
44
/* SPDX-License-Identifier: BSD-3-Clause
*
* Samsung FOD Wakeup
* Tiny service for in-display fingerprint to do tap-to-wake-and-scan
* for Samsung devices with a compatible kernel.
*
* Copyright (c) 2019 Nanda Oktavera
* Extensions 2021 John Vincent
* Released under the terms of 3-clause BSD License
*
*/
// #define DEBUG
#ifndef SECTS_WAKEUP_H
#define SECTS_WAKEUP_H
#ifdef __GNUC__
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else
#define likely(x) (x)
#define unlikely(x) (x)
#endif
#define EVDEV "/dev/input/event8" // sec_touchpad input event path
#define TSDEV "/dev/input/event4" // sec_touchscreen input event path
#define PRDEV "/sys/devices/virtual/sensors/proximity_sensor/raw_data" // proximity sensor raw data
#define BLDEV "/sys/class/backlight/panel/actual_brightness"
#define INP_OFF 455 // when area is touched while screen is off for longpress
#define INP_AOD 454 // when area is touched while screen is off for singletap
#define DELAY 10000
#ifdef DEBUG
#define dbg printf
#else
#define dbg(fmt,...) do {} while (0)
#endif
int send_input(char *input, uint16_t type, uint16_t code, uint16_t value);
int readfint(char *file);
#define APP_VERSION "1.4"
#endif