Improve SPI bus implementation

Make possible to define chip-select pin for internal SPI.
By defining chip-select pin, it's possible to start specific SPI device only.
This allows to have several same type of sensors on the same bus with different orientation.
This commit is contained in:
Jani Paalijarvi
2021-11-15 13:09:35 +02:00
committed by Beat Küng
parent 35d4986ea7
commit 02336acd61
6 changed files with 21 additions and 11 deletions
+2 -2
View File
@@ -137,8 +137,8 @@ class ModuleDocumentation(object):
"\"board-specific bus (default=all) (external SPI: n-th bus (default=1))\"", 'true'])
if self._is_bool_true(args[1]):
self._handle_usage_param_int(['\'c\'', '1', '1', '10',
"\"chip-select index (for external SPI)\"", 'true'])
self._handle_usage_param_int(['\'c\'', '-1', '0', '31',
"\"chip-select pin (for internal SPI) or index (for external SPI)\"", 'true'])
self._handle_usage_param_int(['\'m\'', '-1', '0', '3', "\"SPI mode\"", 'true'])
self._handle_usage_param_int(['\'f\'', '-1', '0', '1000000', "\"bus frequency in kHz\"", 'true'])