C with microcontrollers: is the starting address of the structure a specific address?

I read some things about pointers and structures, but I just don’t understand: This is the contents in the microcontroller header file:

#define NVIC_BASE (SCS_BASE + 0x0100) /*< NVIC Base Address */ (1)
#define NVIC ((NVIC_Type *) NVIC_BASE) /*< NVIC configuration struct */ (2)

The last code could be something like:

NVIC->ICER[0] = (1<<4);

Does this fit (due to the definition):

(NVIC_Type *) NVIC_BASE).ICER[0] = (1<<4);

NVIC_Type is a typed structure with some registers for setting and clearing interrupts. Obviously (2) somehow controls that the starting address of the structs is the address of NVIC_BASE. But how?

What does the pointer (*) AFTER this structure in parentheses (NVIC_Type *) mean?

+3
source share
1 answer

NVIC_BASE - . (NVIC_Type *) , , NVIC, NVIC_Type.

, NVIC->ICER[0], NVIC , . , , , .

, NVIC->ICER[0] = (1<<4); (*(NVIC_Type *) NVIC_BASE).ICER[0] = (1<<4);

+3

All Articles