Skip to content
RED SAG Skills
mediumStudy question · answer published in Embedded C interview questions, so no pointsembedded-cregisters

A struct over peripheral registers

Vendor headers often define a peripheral like this. What makes it work?

typedef struct {
    volatile uint32_t CR;
    volatile uint32_t SR;
    volatile uint32_t DR;
} UART_TypeDef;
#define UART1 ((UART_TypeDef *)0x40011000u)
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions