merge u2f endian fix

This commit is contained in:
Conor Patrick
2019-02-02 00:32:36 -05:00
30 changed files with 264 additions and 73 deletions

View File

@@ -1,4 +1,4 @@
# STM32L4xx Solo
# STM32L432 Solo
Check out our [official documentation](https://solo.solokeys.io/building/)
Check out our [official documentation](https://docs.solokeys.io/solo/building/)
for instructions on building and programming!

View File

@@ -56,12 +56,14 @@
#ifndef SOLO_HACKER
#define USBD_MANUFACTURER_STRING "Solo Keys"
#define USBD_PRODUCT_FS_STRING "Solo"
#define USBD_SERIAL_NUM "solocafebabe"
#ifndef USBD_SERIAL_NUM
#define USBD_SERIAL_NUM "0123456789ABCDEF"
#endif
#else
#define USBD_MANUFACTURER_STRING "Solo Keys"
#define USBD_PRODUCT_FS_STRING "Solo HACKER (Unlocked)"
#ifndef USBD_SERIAL_NUM
#define USBD_SERIAL_NUM "Solo-Keys-Solo"
#define USBD_SERIAL_NUM "0123456789ABCDEF"
#endif
#endif

View File

@@ -114,15 +114,10 @@ USBD_ClassTypeDef USBD_HID =
NULL,
NULL,
NULL,
NULL,
NULL,
// USBD_HID_GetFSCfgDesc,
// USBD_HID_GetFSCfgDesc,
// USBD_HID_GetFSCfgDesc,
// USBD_HID_GetDeviceQualifierDesc,
USBD_HID_GetFSCfgDesc,
USBD_HID_GetFSCfgDesc,
USBD_HID_GetFSCfgDesc,
USBD_HID_GetDeviceQualifierDesc,
};
#define USBD_HID_CfgHSDesc USBD_HID_OtherSpeedCfgDesc

View File

@@ -276,7 +276,7 @@ void init_usb()
// Enable USB Clock
SET_BIT(RCC->APB1ENR1, RCC_APB1ENR1_USBFSEN);
#if DEBUG_LEVEL > 0
USBD_Composite_Set_Classes(&USBD_HID, &USBD_CDC);
in_endpoint_to_class[HID_EPIN_ADDR & 0x7F] = 0;
out_endpoint_to_class[HID_EPOUT_ADDR & 0x7F] = 0;
@@ -290,6 +290,10 @@ void init_usb()
//
// USBD_RegisterClass(&Solo_USBD_Device, &USBD_CDC);
USBD_CDC_RegisterInterface(&Solo_USBD_Device, &USBD_Interface_fops_FS);
#else
USBD_Init(&Solo_USBD_Device, &Solo_Desc, 0);
USBD_RegisterClass(&Solo_USBD_Device, &USBD_HID);
#endif
USBD_Start(&Solo_USBD_Device);
}