https://github.com/oxplot/go-typec
USB Type-C Libraries for Go
https://github.com/oxplot/go-typec
fusb302 power-delivery usb-pd
Last synced: 11 months ago
JSON representation
USB Type-C Libraries for Go
- Host: GitHub
- URL: https://github.com/oxplot/go-typec
- Owner: oxplot
- License: bsd-3-clause
- Created: 2022-08-01T12:23:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-04T09:04:45.000Z (over 2 years ago)
- Last Synced: 2023-07-27T22:27:13.676Z (over 2 years ago)
- Topics: fusb302, power-delivery, usb-pd
- Language: Go
- Homepage:
- Size: 45.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: License
Awesome Lists containing this project
README
[](https://pkg.go.dev/github.com/oxplot/go-typec)
**USB Type-C Power Delivery Module for Go**
At the moment, only sink functionality is implemented. Sink refers to a
power consumer. You can use the module to request specific voltage and
current from USB-C power source such as wall adapters, power banks and
more.
Goals:
- Easy to use, understand and modify.
- Familiar to Go programmers.
- Efficient resource utilization so it can run on microcontrollers and
in embedded environments.
- Compatibility with various port controller hardware.
Non-goals:
- Following standard word for word.
- Implementing all PD functionality.
There are examples in the [examples](./examples) directory to get you
started.
*Note that the timing requirements of PD messaging is rather strict. As
such, in environments where communication latency is high, it may not be
possible to implement a working program. For example, on a linux desktop
using the MCP2221 I2C bridge to communicate with FUSB302 PD port
controller, each I2C transaction latency is too high (~10ms) for things
to work. Your mileage may vary.*