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

AN664 데이터 시트보기 (PDF) - Silicon Laboratories

부품명
상세내역
제조사
AN664 Datasheet PDF : 18 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
AN664
2. Detailed HAL Overview
The HAL for each module consists of *_Registers.h, *_Type.h, and *_Type.c file. Some modules will have an
additional *_Support.h file. This section discusses the role of each of these files in detail.
Note: All definitions, functions, and macros in the Silicon Labs HAL start with a SI32_ shield to prevent any potential conflicts
with other code in the system.
2.1. Registers Header File (Registers.h)
The *_Registers.h file creates a memory map of the module’s registers and bits. In addition, this file declares
detailed definitions to manipulate each bit or field.
2.1.1. Registers
Each of the module’s registers are defined as:
struct SI32_Peripheral_R_Register_Struct
{
union
{
struct
{
volatile uint32_t bitfield0: 4;
volatile uint32_t bitfield1: 12;
volatile uint8_t bitfield2;
volatile uint32_t bitfield3: 4;
uint32_t reserved0: 4;
};
volatile uint32_t U32;
};
};
In this definition, Peripheral is the generic name of the peripheral (USART, for example), R is the revision (A, B,
etc.), and Register is the name of the register. The size of the bitfields in a register structure must add up to 32 bits.
Any 8- or 16-bit bitfields aligned on 8-bit boundaries are not defined as bitfields but as uint8_t or uint16_t. Unused
bitfield regions are defined as reserved#.
Rev. 0.2
7

Share Link: 

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