diff --git a/targets/stm32l432/bootloader/bootloader.h b/targets/stm32l432/bootloader/bootloader.h index 22e5db3..d12d953 100644 --- a/targets/stm32l432/bootloader/bootloader.h +++ b/targets/stm32l432/bootloader/bootloader.h @@ -1,21 +1,21 @@ /* * Copyright (C) 2018 SoloKeys, Inc. - * + * * This file is part of Solo. - * + * * Solo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * Solo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with Solo. If not, see - * + * * This code is available under licenses for commercial use. * Please contact SoloKeys for more information. */ @@ -65,6 +65,13 @@ #define SKIP_BUTTON_CHECK_WITH_DELAY 0 #define SKIP_BUTTON_CHECK_FAST 1 + +#define BOOT_VERSION_MAJ 1 +#define BOOT_VERSION_MIN 0 +#define __STR_HELPER(x) #x +#define __STR(x) __STR_HELPER(x) +#define SOLO_PRODUCT_NAME "Solo Bootloader " __STR(BOOT_VERSION_MAJ) "." __STR(BOOT_VERSION_MIN) + void printing_init(); void hw_init(void); diff --git a/targets/stm32l432/lib/usbd/usbd_desc.c b/targets/stm32l432/lib/usbd/usbd_desc.c index bd0ed90..88b920d 100644 --- a/targets/stm32l432/lib/usbd/usbd_desc.c +++ b/targets/stm32l432/lib/usbd/usbd_desc.c @@ -53,19 +53,10 @@ #define USBD_VID 0x0483 #define USBD_PID 0xA2CA #define USBD_LANGID_STRING 0x409 -#ifndef SOLO_HACKER -#define USBD_MANUFACTURER_STRING "Solo Keys" -#define USBD_PRODUCT_FS_STRING "Solo" -#ifndef USBD_SERIAL_NUM +#define USBD_MANUFACTURER_STRING "SoloKeys" +#define USBD_PRODUCT_FS_STRING SOLO_PRODUCT_NAME #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 "0123456789ABCDEF" -#endif -#endif + uint8_t *USBD_HID_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); uint8_t *USBD_HID_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); diff --git a/targets/stm32l432/src/app.h b/targets/stm32l432/src/app.h index 1da200d..8ffe43e 100644 --- a/targets/stm32l432/src/app.h +++ b/targets/stm32l432/src/app.h @@ -43,6 +43,16 @@ // #define DISABLE_CTAPHID_PING // #define DISABLE_CTAPHID_WINK // #define DISABLE_CTAPHID_CBOR +#define SOLO_VERSION_MAJ 1 +#define SOLO_VERSION_MIN 0 +#define __STR_HELPER(x) #x +#define __STR(x) __STR_HELPER(x) + +#if defined(SOLO_HACKER) +#define SOLO_PRODUCT_NAME "Solo Hacker " __STR(SOLO_VERSION_MAJ) "." __STR(SOLO_VERSION_MIN) +#else +#define SOLO_PRODUCT_NAME "Solo " __STR(SOLO_VERSION_MAJ) "." __STR(SOLO_VERSION_MIN) +#endif void printing_init(); void hw_init(void);