spilite
A lite wrapper for spidev.
Overview
Spilite is a wrapper for spidev. It adds
- Entry and exit behaviour so that a SPI device can be treated as a file handle
- Additional types to support different software controlled chip select schemes
- single pin (active high or low)
- hardware address decoder (e.g. 74HC138)
For pin behaviour, gpiozero types are used. This approach assumes that the hardware control of the chip select is not used (i.e. not using the hardware flow control with the micro's own SPI controller).
Example
import spilite.spi as spi
from spilite.cs.pins import ChipSelectPin
# setup chip select pin
cs_pin = ChipSelectPin(21)
cs_pin.unselect()
# setup the SPI bus device (speed and cpol)
dev = spi.Port(cs=cs_pin, max_speed_hz=1000000, mode=0b11)
# ...
# send/receive two bytes
buffer = [0xff, 0xab]
with dev as bus:
bus.xfer2(buffer)
Metadata
Release files for spilite 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spilite-0.1.4.tar.gz | 3.6 kB | Without provenance | Details for spilite-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spilite-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for spilite-0.1.4-py3-none-any.whl |
Total release size: 8.0 kB
Release files / spilite-0.1.4.tar.gz
| Download URL | spilite-0.1.4.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
163cc006297c854a3645af384867352523e89e3c9aab776d7879ef57cab2b57a
|
|
BLAKE2b-256 checksum How to use checksums |
049e48cddea6ab63f6fb77ee458cc5d2414235d1ac0009cd4d5965c2f570d0a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Release files / spilite-0.1.4-py3-none-any.whl
| Download URL | spilite-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
742805ad29a53b17e3a5078f880686c5d6e54a230843ae3cba13ba34901c31a7
|
|
BLAKE2b-256 checksum How to use checksums |
8c86779f377172a0267674d480a5855c6b5b30d187c586e84860eba3c2292a3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Security for spilite 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.