Skip to main content

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.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

spi_repl-0.1.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file spi_repl-0.1.2.tar.gz.

File metadata

  • Download URL: spi_repl-0.1.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for spi_repl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7adf53bf41d14f33286cb0bbf6bc20342d1160dfd98a898753fe212f41c47fa6
MD5 61c0f59a37edae40973ec49a06e03c77
BLAKE2b-256 13df74d511e691de90fc8138c73fc1744e347d9199d9028ce3a5003f6f0f9895

See more details on using hashes here.

File details

Details for the file spi_repl-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: spi_repl-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for spi_repl-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1503730dafcf09f99f53cb2a3d7a7c91fabb344964b6d3dcddfc6a8e8c31fc8b
MD5 6438f25e2313b64ad3f2c38e6342964e
BLAKE2b-256 a58333d9f35d618129cd06441ac039ed8b03e0459b542313f4d8fdbd72867593

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page