PCI driver for python
Environment
- Linux
- python 3
- require : portio module
Installation
pip install pypci
Usage
>>> import pypci
# look-up pci board
>>> board = pypci.lspci(vendor=0x1147, device=3214)
>>> board[0].vendor_id
4423
>>> board[0].bar
[BaseAddressRegister(type='mem', addr=2421170176, size=64),
BaseAddressRegister(type='mem', addr=2421166080, size=64),
BaseAddressRegister(type='mem', addr=2421174272, size=32)]
# read data
>>> bar2 = board[0].bar[2]
>>> pypci.read(bar2, 0x0c, 4)
b'\x00\x00\x00\x0c'
# write data
>>> pypci.write(bar[2], 0x04, b'\x01')
>>> data = struct.pack('<I', 1234567)
>>> pypci.write(bar[2], 0x00, data)
Release files for pypci 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 | |
|---|---|---|---|
| pypci-0.1.4.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypci-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / pypci-0.1.4.tar.gz
| Download URL | pypci-0.1.4.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bf78f19ee4879671b60b582c699a9a3fbdb1f7f337e55b119bb07921423da8e
|
|
BLAKE2b-256 checksum How to use checksums |
ed4e9a3072b32ec5d04f93ba2f7783bbedb9b3885f65fa275d90cc086bfc0c32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pypci-0.1.4-py3-none-any.whl
| Download URL | pypci-0.1.4-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35c46cfde2d1fc692527941323bdd66c0487f16e6ac7768f86e53fc32b1d8156
|
|
BLAKE2b-256 checksum How to use checksums |
609f1b04d3525a1fe4539e009b1b7d40ef85ac48d0898a10d34a6c2ad7467d40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|