microsoft / ms-tpm-20-ref

Reference implementation of the TCG Trusted Platform Module 2.0 specification.
Other
333 stars 133 forks source link

Dev rev type fix #60

Closed acwiek closed 2 years ago

acwiek commented 2 years ago

Hi, I found an error in StmUtli.c, DEVICE_TYPE, and DEVICE_REV are defined incorrectly.

As DBGMCU struct is a pointer to memory address

#define DBGMCU_BASE           ((uint32_t)0xE0042000U)
...
#define DBGMCU                ((DBGMCU_TypeDef *) DBGMCU_BASE)

We shouldn't dereference it when its member is accessed through the -> operator.