-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rev41-1350: Move backlight to board from shield
- Loading branch information
Showing
4 changed files
with
43 additions
and
39 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
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,9 @@ | ||
if ZMK_BACKLIGHT | ||
|
||
config PWM | ||
default y | ||
|
||
config LED_PWM | ||
default y | ||
|
||
endif # ZMK_BACKLIGHT |
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,34 @@ | ||
&pinctrl { | ||
// Other pinctrl definitions for other hardware | ||
pwm0_default: pwm0_default { | ||
group1 { | ||
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>; | ||
}; | ||
}; | ||
pwm0_sleep: pwm0_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&pwm0 { | ||
status = "okay"; | ||
pinctrl-0 = <&pwm0_default>; | ||
pinctrl-1 = <&pwm0_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
}; | ||
|
||
/ { | ||
chosen { | ||
zmk,backlight = &backlight; | ||
}; | ||
|
||
backlight: pwmleds { | ||
compatible = "pwm-leds"; | ||
pwm_led_0 { | ||
pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>; | ||
}; | ||
}; | ||
}; |
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