| Crates.io | usb4604 |
| lib.rs | usb4604 |
| version | 0.2.0 |
| created_at | 2025-12-21 14:43:25.492604+00 |
| updated_at | 2025-12-22 13:28:17.576051+00 |
| description | Hardware abstraction layer for USB4604 hub (GPIO control and I2C master) |
| homepage | |
| repository | https://github.com/romixlab/usb4604 |
| max_upload_size | |
| id | 1998086 |
| size | 51,904 |
Hardware abstraction layer for USB4604 hub.
Supported features:
Unsupported features:
Hub IC exposes one more USB device, referred to as "feature controller" in the docs. USB control transfers are used to access registers, which in turn can control GPIOs, I2C master controller and other things.
This crate uses awesome nusb to interact with the USB.
Not all GPIOs are actually working, most of the pins are multi-function, and when by default a pin is doing something else it most likely won't be controllable. Documentation is rather vague on this, referring to some pins as reconfigurable, but in practice not all registers are writeable from the USB interface.
List of verified to be working GPIO pins:
In order for the hub to boot properly, SCL and SDA must be held low during power-on, otherwise it will wait forever for configuration over I2C and won't appear on USB at all. Recommended way is to use one of the GPIOs to enable pull-up resistors.
According to the documentation, USB2532, USB2533, USB2534, USB3613, USB3813, USB4624 are very similar to USB4604. They can probably be supported rather easily, but there was no need as for now I'm only using USB4604 in my projects. Leaving this list here to help search engines.