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
FIFO registers are not defined using any bitfields. If byte accesses are not allowed, the register structure does not
include a uint8_t definition. The same applies to half-word accesses and the uint16_t definition. All FIFOs are
accessed from the least significant byte, so there is no explicit access provided for the upper three bytes or the
upper half-word.
struct SI32_Peripheral_R_Register_Struct
{
union
{
volatile uint8_t U8;
volatile uint16_t U16;
volatile uint32_t U32;
};
};
2.1.2. Bitfields
Each of the bitfields of a module has several defines in the *_Registers.h file. These defines all have the form
SI32_Module_Revision_Register_Bitfield_DefineType. The DefineType is:
MASK: a bit mask for the position of the bit or field in the register.
SHIFT: a left-shift value for the position of the bit or field in the register.
Enumeration_VALUE or Enumeration_U32: These enumerations define every valid value of the bit or
field. The enumerations also include a U32 version that the HAL routines can write to entire register using
the defined SHIFT value.
For example, with the IPRDY bit in the EPCONTROL register (bit 0) of the USBEP module:
#define SI32_USBEP_A_EPCONTROL_IPRDYI_MASK 0x00000001
#define SI32_USBEP_A_EPCONTROL_IPRDYI_SHIFT 0
// The packet has been sent or there is an open FIFO slot.
#define SI32_USBEP_A_EPCONTROL_IPRDYI_NOT_SET_VALUE 0
#define SI32_USBEP_A_EPCONTROL_IPRDYI_NOT_SET_U32 \
(SI32_USBEP_A_EPCONTROL_IPRDYI_NOT_SET_VALUE <<
SI32_USBEP_A_EPCONTROL_IPRDYI_SHIFT)
// A packet is loaded in the FIFO.
#define SI32_USBEP_A_EPCONTROL_IPRDYI_SET_VALUE 1
#define SI32_USBEP_A_EPCONTROL_IPRDYI_SET_U32 \
(SI32_USBEP_A_EPCONTROL_IPRDYI_SET_VALUE <<
SI32_USBEP_A_EPCONTROL_IPRDYI_SHIFT)
The NOT_SET and SET definitions are the enumerations for this bit. The VALUE definitions set the value of each
valid bit value, and the U32 definitions are the appropriate write value for the bit when writing to entire register.
8
Rev. 0.2

Share Link: 

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