File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,11 @@ use crate::rtc::Rtc;
48
48
pub const APP_NAME : & str = "Plato" ;
49
49
const FB_DEVICE : & str = "/dev/fb0" ;
50
50
const RTC_DEVICE : & str = "/dev/rtc0" ;
51
- const EVENT_BUTTONS : & str = "/dev/input/event2" ; // reMarkable gpio-keys
52
- pub const EVENT_TOUCH_SCREEN : & str = "/dev/input/event1" ; // reMarkable cyttsp5_mt (Multitouch)
53
- pub const EVENT_WACOM : & str = "/dev/input/event0" ; // reMarkable Wacom I2C Digitizer (Pen input)
51
+ lazy_static ! {
52
+ pub static ref EVENT_BUTTONS : String = libremarkable:: input:: scan:: SCANNED . gpio_path. to_str( ) . unwrap( ) . to_owned( ) ;
53
+ pub static ref EVENT_TOUCH_SCREEN : String = libremarkable:: input:: scan:: SCANNED . multitouch_path. to_str( ) . unwrap( ) . to_owned( ) ;
54
+ pub static ref EVENT_WACOM : String = libremarkable:: input:: scan:: SCANNED . wacom_path. to_str( ) . unwrap( ) . to_owned( ) ;
55
+ }
54
56
const KOBO_UPDATE_BUNDLE : & str = "/mnt/onboard/.kobo/KoboRoot.tgz" ;
55
57
const KEYBOARD_LAYOUTS_DIRNAME : & str = "keyboard-layouts" ;
56
58
const DICTIONARIES_DIRNAME : & str = "dictionaries" ;
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ pub enum InputSource {
82
82
impl InputSource {
83
83
pub fn to_path ( & self ) -> & str {
84
84
match self {
85
- InputSource :: Pen => EVENT_WACOM ,
86
- InputSource :: Touch => EVENT_TOUCH_SCREEN ,
85
+ InputSource :: Pen => & EVENT_WACOM ,
86
+ InputSource :: Touch => & EVENT_TOUCH_SCREEN ,
87
87
}
88
88
}
89
89
You can’t perform that action at this time.
0 commit comments