No project description provided
Project description
spi-repl
Pure python SPI REPL (Read-Evaluate-Print-Loop) which allows you to interact with SPI devices from the command line.
- 0 dependencies, only python.
- Python 3.7+.
- Windows is not supported.
Installation
pip install spi-repl
Example:
$ spi-repl --help
usage: spi-repl [-h] [--device DEVICE] [--speed SPEED] [--bits-per-word BITS_PER_WORD] [--phase] [--polarity] [--cs-high] [--lsb-first] [--three-wire] [--loop] [--no-cs] [--ready]
SPI REPL
options:
-h, --help show this help message and exit
--device DEVICE SPI device. Default: /dev/spidev0.0
--speed SPEED SPI speed. Default: 1000000
--bits-per-word BITS_PER_WORD
SPI bits per word. Default: 8
--phase SPI phase. Default: False
--polarity SPI polarity. Default: False
--cs-high SPI chip select active level. Default: False
--lsb-first SPI bit order. Default: False
--three-wire SPI 3-wire mode. Default: False
--loop SPI loopback mode. Default: False
--no-cs SPI no chip select. Default: False
--ready SPI slave pulls low to pause. Default: False
$ spi-repl --speed 5000000
SPI device: /dev/spidev0.0 speed: 5000000 bits_per_word: 8
now enter hex strings to send to the device
/dev/spidev0.0 <<< 0100
/dev/spidev0.0 >>> 0008
/dev/spidev0.0 <<< 010000000000000000000000000
expected hex string ('00112233445566778899aabbccddeeff')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spi_repl-0.1.3.tar.gz
(6.5 kB
view details)
Built Distribution
File details
Details for the file spi_repl-0.1.3.tar.gz
.
File metadata
- Download URL: spi_repl-0.1.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b2223d0f29480b51cd08a5ab04d994d107f08f1bbc59d3acfe20ec8e3d7a776 |
|
MD5 | 4a651f66d0de80b50c1a3a190c7dd19a |
|
BLAKE2b-256 | f34cd00e4eea71a94676f1fe0d98822e9a51af748043cc3cac16d52c0cc58051 |
File details
Details for the file spi_repl-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: spi_repl-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75877bb044897cbc0e3b4fd00d9490f9e789e91a9cf2a89deaf98be8d7ed3ecd |
|
MD5 | 3f0e493ff20f8c36a6be98efe6517114 |
|
BLAKE2b-256 | 69990cd1f3da8c17e369140570341d85ccd87bae0589cad820f9586afdf91600 |