Unofficial USB Power Delivery toolbox for Python
Project description
pyusbpd
Python structures and decoding for USB Power Delivery exploration, testing and maybe more?
from pyusbpd.message import Message
from pyusbpd.enum import SOP
msg = Message(sop=SOP.SOP, raw=b"\x41\x0C").decode()
print(msg)
# <pyusbpd.message.GoodCRCMessage object at 0x7f0a8b2ca9b0>
print(msg.message_header)
# USB Power Delivery Message Header
# ---
# Extended: False
# Number of Data Objects: 0
# MessageID: 6
# Port Power Role: False
# Cable Plug: False
# Specification Revision: Revision 2.0
# Port Data Role: False
# Message Type: 1
pyusbpd is mostly in a PoC state, but feel free to send pull requests ;-)
Install
git clone https://github.com/jeanthom/pyusbpd
cd pyusbpd
python setup.py install --user
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyusbpd-0.0.1.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyusbpd-0.0.1.tar.gz.
File metadata
- Download URL: pyusbpd-0.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc18d57296bc9a3a8e5c07dddb4b48073bd5d71f5e3333d1fc9cea2ab9d2c41e
|
|
| MD5 |
885281941f78fcd52b92eba012f5b65e
|
|
| BLAKE2b-256 |
343c5beda245b73b4482f2ae436013ca8c05e3c3728e6f172ae6598aa4af9302
|
File details
Details for the file pyusbpd-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pyusbpd-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fbc29c8d9d7ffa626782f8b2444c3802a15bf856386d3f64e44c885b039b335
|
|
| MD5 |
41550a14edf575909cc383f631117d47
|
|
| BLAKE2b-256 |
ac33a588ae39f41e0d1d553af887138fc84cfb23cefef9c3476cdb1c7bb846d6
|