/*
 * Device Tree Overlay für nRF52840 DK
 * Definiert GPIO-Pins für Trigger, LEDs und IR-Transmission (PWM3 @ P0.16)
 */

/ {
	aliases {
		trigger-btn = &button0;
		ir-output = &ir_tx0;
		led-status = &led0;
		led-power = &led1;
	};

	buttons {
		compatible = "gpio-keys";
		button0: button_0 {
			gpios = <&gpio0 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
			label = "Trigger Button";
		};
	};

	leds {
		compatible = "gpio-leds";
		led0: led_0 {
			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
			label = "Status LED";
		};
		led1: led_1 {
			gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
			label = "Power LED";
		};
	};

	ir_pwm: ir_pwm {
		compatible = "pwm-leds";
		ir_tx0: ir_tx_0 {
			pwms = <&pwm3 0 PWM_NSEC(26316) PWM_POLARITY_NORMAL>;
			label = "IR TX PWM";
		};
	};
};

&pwm3 {
	status = "okay";
	pinctrl-0 = <&pwm3_default>;
	pinctrl-names = "default";
};

&pinctrl {
	pwm3_default: pwm3_default {
		group1 {
			psels = <NRF_PSEL(PWM_OUT0, 0, 16)>;
		};
	};
};

