Skip to content
RED SAGSkills
medium10 pts · first answer countsembedded-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