mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-26 08:05:10 +02:00
Adde LWIP interface to Phy.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -159,7 +159,7 @@ int phy_unserialize_data(const uint8_t *data, uint16_t len, phy_data_t *phy) {
|
||||
}
|
||||
}
|
||||
if (!phy_data.enabled_usb_itf_present) {
|
||||
phy_data.enabled_usb_itf = PHY_USB_ITF_CCID | PHY_USB_ITF_WCID | PHY_USB_ITF_HID | PHY_USB_ITF_KB;
|
||||
phy_data.enabled_usb_itf = PHY_USB_ITF_ALL;
|
||||
phy_data.enabled_usb_itf_present = true;
|
||||
}
|
||||
return PICOKEY_OK;
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#define PHY_USB_ITF_HID 0x4
|
||||
#define PHY_USB_ITF_KB 0x8
|
||||
#define PHY_USB_ITF_LWIP 0x10
|
||||
#define PHY_USB_ITF_ALL (PHY_USB_ITF_CCID | PHY_USB_ITF_WCID | PHY_USB_ITF_HID | PHY_USB_ITF_KB | PHY_USB_ITF_LWIP)
|
||||
|
||||
#define PHY_LED_DRIVER_PICO 0x1
|
||||
#define PHY_LED_DRIVER_PIMORONI 0x2
|
||||
|
||||
@@ -98,7 +98,7 @@ void usb_init(void)
|
||||
queue_init(&card_to_usb_q, sizeof(uint32_t), 64);
|
||||
queue_init(&usb_to_card_q, sizeof(uint32_t), 64);
|
||||
|
||||
uint8_t enabled_usb_itf = PHY_USB_ITF_CCID | PHY_USB_ITF_WCID | PHY_USB_ITF_HID | PHY_USB_ITF_KB | PHY_USB_ITF_LWIP;
|
||||
uint8_t enabled_usb_itf = PHY_USB_ITF_ALL;
|
||||
#ifndef ENABLE_EMULATION
|
||||
if (phy_data.enabled_usb_itf_present) {
|
||||
enabled_usb_itf = phy_data.enabled_usb_itf;
|
||||
|
||||
Reference in New Issue
Block a user