DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

AN664 View Datasheet(PDF) - Silicon Laboratories

Part Name
Description
Manufacturer
AN664 Datasheet PDF : 18 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
AN664
2.1.3. Modules
A module structure at the end of each *_Registers.h file aggregates all of the peripherals’s registers and spaces
them from the peripheral base pointer address:
typedef struct SI32_Peripheral_R_Struct
{
struct SI32_PERIPHERAL_R_REGNAME1_Struct
Register1;
uint32
Register1_SET;
uint32
Register1_CLR;
uint32_t
reserved0;
struct SI32_Peripheral_R_Register2_Struct
Register2;
uint32_t
reserved1;
uint32_t
reserved2;
uint32_t
reserved3;
} SI32_Peripheral_R_Type;
The struct is assumed to start at offset 0x0 from the peripheral’s base pointer. In this example, Register1 is at
address 0x0 and supports clear and set addresses, so Register1_SET is located at 0x04 and Register1_CLR is
located at 0x08. There is no mask address defined for this register, so the corresponding address 0x0C is simply
marked as reserved#. Register2 has no set, clear, or mask addresses, so these offsets are also defined as
reserved#.
This struct is never allocated as a variable; it is simply used as offsets from a base pointer.
10
Rev. 0.2

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]