-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
9 changed files
with
489 additions
and
159 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
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
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,16 @@ | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
||
description: GPIO KEYS parent node | ||
|
||
compatible: "gpio-km" | ||
|
||
child-binding: | ||
description: GPIO KEYS child node | ||
properties: | ||
gpios: | ||
type: phandle-array | ||
required: true | ||
label: | ||
required: true | ||
type: string | ||
description: Human readable string describing the device (used as device_get_binding() argument) |
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,88 @@ | ||
|
||
// 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 | ||
|
||
/ { | ||
km { | ||
// compatible = "gpio-keys"; | ||
compatible = "gpio-km"; | ||
col0: column_0 { | ||
gpios = <&gpio1 10 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
label = "Column 0"; | ||
}; | ||
col1: column_1 { | ||
gpios = <&gpio1 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
label = "Column 1"; | ||
}; | ||
col2: column_2 { | ||
gpios = <&gpio1 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
label = "Column 2"; | ||
}; | ||
|
||
row0: row_0 { | ||
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; | ||
label = "Row 0"; | ||
}; | ||
row1: row_1 { | ||
gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; | ||
label = "Row 1"; | ||
}; | ||
row2: row_2 { | ||
gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; | ||
label = "Row 2"; | ||
}; | ||
row3: row_3 { | ||
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; | ||
label = "Row 3"; | ||
}; | ||
}; | ||
|
||
aliases { | ||
col0 = &col0; | ||
col1 = &col1; | ||
col2 = &col2; | ||
row0 = &row0; | ||
row1 = &row1; | ||
row2 = &row2; | ||
row3 = &row3; | ||
}; | ||
|
||
chosen { | ||
// zephyr,console = &uart1; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
spi1_default_alt: spi1_default_alt{ | ||
group1{ | ||
psels = <NRF_PSEL(SPIM_SCK, 1, 5)>, | ||
<NRF_PSEL(SPIM_MOSI, 1, 8)>, | ||
<NRF_PSEL(SPIM_MISO, 1, 9)>; | ||
}; | ||
}; | ||
spi1_sleep_alt: spi1_sleep_alt{ | ||
group1{ | ||
psels = <NRF_PSEL(SPIM_SCK, 1, 5)>, | ||
<NRF_PSEL(SPIM_MOSI, 1, 8)>, | ||
<NRF_PSEL(SPIM_MISO, 1, 9)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi1 { | ||
compatible = "nordic,nrf-spim"; | ||
status = "okay"; | ||
pinctrl-0 = <&spi1_default_alt>; | ||
pinctrl-1 = <&spi1_sleep_alt>; | ||
pinctrl-names = "default", "sleep"; | ||
cs-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; | ||
|
||
pmw3360@0 { | ||
compatible = "pixart,pmw3360"; | ||
reg = <0>; | ||
irq-gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; | ||
spi-max-frequency = <1200000>; | ||
label = "pmw3360"; | ||
}; | ||
}; |
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 |
---|---|---|
@@ -1,12 +1,25 @@ | ||
# | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
CONFIG_GPIO=y | ||
|
||
CONFIG_GZLL=y | ||
CONFIG_GAZELL=y | ||
|
||
CONFIG_DK_LIBRARY=y | ||
|
||
CONFIG_LOG=y | ||
CONFIG_LOG_MODE_MINIMAL=y | ||
|
||
# CONFIG_SPI_LOG_LEVEL_INF=y | ||
# CONFIG_PMW3360_LOG_LEVEL_DBG=y | ||
|
||
# CONFIG_SPI=y | ||
# CONFIG_SENSOR=y | ||
# CONFIG_PMW3360=y | ||
# CONFIG_PMW3360_ORIENTATION_0=y | ||
# CONFIG_PMW3360_CPI=1600 | ||
# CONFIG_PMW3360_RUN_DOWNSHIFT_TIME_MS=500 | ||
# CONFIG_PMW3360_REST1_DOWNSHIFT_TIME_MS=500 | ||
# CONFIG_PMW3360_REST2_DOWNSHIFT_TIME_MS=500 | ||
|
||
CONFIG_CBPRINTF_FP_SUPPORT=y |
Oops, something went wrong.