forked from grassfedreeve/Charybdis-ZMK-Config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68c0b4a
commit 00d2466
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#define INPUT_EV_KEY 0x01 /**< Key event */ | ||
#define INPUT_EV_REL 0x02 /**< Relative coordinate event */ | ||
#define INPUT_EV_ABS 0x03 /**< Absolute coordinate event */ | ||
#define INPUT_EV_MSC 0x04 /**< Miscellaneous event */ | ||
#define INPUT_EV_VENDOR_START 0xf0 /**< Vendor specific event start */ | ||
#define INPUT_EV_VENDOR_STOP 0xff /**< Vendor specific event stop */ | ||
|
||
#define INPUT_REL_X 0x00 /**< Relative X coordinate */ | ||
#define INPUT_REL_Y 0x01 /**< Relative Y coordinate */ | ||
#define INPUT_REL_WHEEL 0x08 /**< Relative wheel coordinate */ | ||
#define INPUT_REL_HWHEEL 0x06 /**< Relative horizontal wheel coordinate */ | ||
#define INPUT_REL_MISC 0x09 /**< Relative misc coordinate */ | ||
|
||
&pinctrl { | ||
spi0_default: spi0_default { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 8)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 17)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 17)>; | ||
}; | ||
}; | ||
|
||
spi0_sleep: spi0_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 8)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 17)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 17)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi0 { | ||
status = "disabled"; | ||
compatible = "nordic,nrf-spim"; | ||
pinctrl-0 = <&spi0_default>; | ||
pinctrl-1 = <&spi0_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; | ||
|
||
trackball: trackball@0 { | ||
status = "disabled"; | ||
compatible = "pixart,pmw3610"; | ||
reg = <0>; | ||
spi-max-frequency = <2000000>; | ||
irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; | ||
cpi = <1000>; | ||
evt-type = <INPUT_EV_REL>; | ||
x-input-code = <INPUT_REL_X>; | ||
y-input-code = <INPUT_REL_Y>; | ||
}; | ||
}; |