// To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.

// You can also use the buttons in the sidebar to perform actions on nodes.
// Actions currently available include:

// * Enabling / disabling the node
// * Adding the bus to a bus
// * Removing the node
// * Connecting ADC channels

// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
// You can also visit the nRF DeviceTree extension documentation at https://nrfconnect.github.io/vscode-nrf-connect/devicetree/nrfdevicetree.html
// &spi1 {
// 	status = "okay";
// };

&spi1 {
	status = "okay";
	pinctrl-0 = <&spi1_default>;
	pinctrl-1 = <&spi1_sleep>;
	pinctrl-names = "default","sleep";
	cs-gpios = <&gpio0 11 (GPIO_ACTIVE_LOW |GPIO_PULL_UP)>;
	status = "okay";
	motor_driver: l6470@0 {
		compatible = "st,l6470";
		reg = <0>;
		spi-max-frequency = <4000000>;
		stby-gpios = <&gpio0 18 (GPIO_ACTIVE_LOW)>;
		status = "okay";
	};
};

&spi1_default {
	group1 {
		psels = <NRF_PSEL(SPIM_MOSI, 0, 30)>,
		  <NRF_PSEL(SPIM_MISO, 0, 29)>,
		  <NRF_PSEL(SPIM_SCK, 0, 31)>;
	};
};

&arduino_adc {
	io-channel-map = <0 &adc 1>, <1 &adc 2>, <2 &adc 4>, <3 &adc 5>, <4 &adc 6>, <5 &adc 7>;
};
