Skip to main content

CircuitPython bus device classes to manage bus sharing.

Project description

Adafruit CircuitPython BusDevice

Documentation Status Discord Build Status Code Style: Ruff

The I2CDevice and SPIDevice helper classes make managing transaction state on a bus easy. For example, they manage locking the bus to prevent other concurrent access. For SPI devices, it manages the chip select and protocol changes such as mode. For I2C, it manages the device address.

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-busdevice

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-busdevice

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-busdevice

Usage Example

See examples/read_register_i2c.py and examples/read_register_spi.py for examples of the module’s usage.

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

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

adafruit_circuitpython_busdevice-5.2.15.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file adafruit_circuitpython_busdevice-5.2.15.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_busdevice-5.2.15.tar.gz
Algorithm Hash digest
SHA256 87a25bf558f1bb8662980af9a2857a53de898942a7b4ab58e16e9ea77cb59f59
MD5 9b5e873534934a4a2dd591ca4d40bc39
BLAKE2b-256 f897f715e5171de12dfe169a3d182400295f83fe9257d48f0160e2683525633e

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_busdevice-5.2.15-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_busdevice-5.2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 4d2b3c4f6c90fe2ef158c506e48972560f4f26c4f3faa51125123c146d4d5748
MD5 51122afc3e003ffc2a9ef1d01f061762
BLAKE2b-256 eaf01fa08d3a5daed6924aea2536e33a6cec1c4d92e9993917b317d72d10db03

See more details on using hashes here.

Supported by

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