Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions libraries/USBDevice/inc/usbd_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#define DEVICE_ID1 (UID_BASE)
#define DEVICE_ID2 (UID_BASE + 0x4U)
#define DEVICE_ID3 (UID_BASE + 0x8U)

/*
* USB Billboard Class USER string desc Defines Template
Expand Down
13 changes: 5 additions & 8 deletions libraries/USBDevice/src/usbd_desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#include "usbd_desc.h"
#include "utils.h"
#include <variant.h>

#include "stm32yyxx_ll_utils.h"
#include "stm32yyxx_ll_system.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/

Expand Down Expand Up @@ -444,13 +445,9 @@ uint8_t *USBD_Class_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *le
*/
static void Get_SerialNum(void)
{
uint32_t deviceserial0;
uint32_t deviceserial1;
uint32_t deviceserial2;

deviceserial0 = *(uint32_t *)DEVICE_ID1;
deviceserial1 = *(uint32_t *)DEVICE_ID2;
deviceserial2 = *(uint32_t *)DEVICE_ID3;
uint32_t deviceserial0 = LL_GetUID_Word0();
uint32_t deviceserial1 = LL_GetUID_Word1();
uint32_t deviceserial2 = LL_GetUID_Word2();

deviceserial0 += deviceserial2;

Expand Down
Loading