Skip to content
Snippets Groups Projects
Verified Commit 625c4c24 authored by Alexander Wellbrock's avatar Alexander Wellbrock
Browse files

move gpiod module config to CONFIG_SCHEMA constant

parent 9edc0bde
Branches
Tags
No related merge requests found
......@@ -127,10 +127,6 @@ gpio_modules:
type: boolean
required: no
default: yes
chip:
type: string
required: no
default: "/dev/gpiochip0"
sensor_modules:
type: list
......
......@@ -7,8 +7,7 @@ from time import sleep
BASE_SCHEMA = {
"name": {"required": True, "empty": False},
"module": {"required": True, "empty": False},
"cleanup": {"required": False, "type": "boolean", "default": True},
"chip": {"required": False, "type": "string", "default": "/dev/gpiochip0"},
"cleanup": {"required": False, "type": "boolean", "default": True}
}
......
......@@ -6,6 +6,14 @@ from threading import Thread
# Requires libgpiod-devel, libgpiod
REQUIREMENTS = ("gpiod",)
CONFIG_SCHEMA = {
"chip": {
"type": "string",
"required": False,
"default": "/dev/gpiochip0"
}
}
DIRECTIONS = None
PULLUPS = None
INTERRUPT = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment