Added PHY options to control the brigthness of the LED and its dimming.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-09-27 20:55:49 +02:00
parent 058473dce9
commit a816b6f747
6 changed files with 27 additions and 8 deletions

View File

@@ -65,11 +65,17 @@ void usb_init() {
if (opts & PHY_OPT_WCID) {
enable_wcid = true;
}
if (opts & PHY_OPT_DIMM) {
led_dimmable = true;
}
}
if (file_get_size(ef_phy) >= 4 && opts & PHY_OPT_VPID) {
desc_device.idVendor = (data[PHY_VID] << 8) | data[PHY_VID+1];
desc_device.idProduct = (data[PHY_PID] << 8) | data[PHY_PID+1];
}
if (opts & PHY_OPT_BTNESS) {
led_phy_btness = data[PHY_LED_BTNESS];
}
}
mutex_init(&mutex);
#endif