PIC24 Support Libraries
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
UINT32 Union Reference

#include <all_generic.h>

Data Fields

uint32 _uint32
 
uint32 u32
 
uint8 u8LoLsb
 
uint8 u8LoMsb
 
uint8 u8HiLsb
 
uint8 u8HiMsb
 
uint16 u16LoWord
 
uint16 u16HiWord
 
uint16 u16Words [2]
 
uint8 u8Bytes [4]
 
unsigned b1: 1
 
unsigned b2: 1
 
unsigned b3: 1
 
unsigned b4: 1
 
unsigned b5: 1
 
unsigned b6: 1
 
unsigned b7: 1
 
unsigned b8: 1
 
unsigned b9: 1
 
unsigned b10: 1
 
unsigned b11: 1
 
unsigned b12: 1
 
unsigned b13: 1
 
unsigned b14: 1
 
unsigned b15: 1
 
unsigned b16: 1
 
unsigned b17: 1
 
unsigned b18: 1
 
unsigned b19: 1
 
unsigned b20: 1
 
unsigned b21: 1
 
unsigned b22: 1
 
unsigned b23: 1
 
unsigned b24: 1
 
unsigned b25: 1
 
unsigned b26: 1
 
unsigned b27: 1
 
unsigned b28: 1
 
unsigned b29: 1
 
unsigned b30: 1
 
unsigned b31: 1
 

Detailed Description

Union structure to hold an uint32 to provide access to 32-bit data with different "viewpoints" (or casts, if you will).

Note
Works on machines that store their data little-endian. If you use big-endian, the members will have to be reordered!
Prefix for all UINT32 structs is U32_
UINT32 U32_x;
uint16 u16_a;
uint8 u8_b;
UINT16 U16_y;
U32_x._uint32 = 0xDEADBEEF;
u16_a = U32_x.u16LoWord; // u16_a equals 0xBEEF
u8_b = U32_x.u8Bytes[0]; // u8_b equals 0xEF
u16_a = U32_x.u16Words[1]; // u16_a equals 0xDEAD
U16_y._uint16 = U32_x.u16LoWord; // where's the "BEEF"?
u8_b = U16_y.uMSb; // u8_b equals 0xBE
while (U32_x.b31); // infinite loop

Definition at line 213 of file all_generic.h.

Field Documentation

uint32 UINT32::_uint32

uint32 viewed as an uint32

Definition at line 215 of file all_generic.h.

unsigned UINT32::b1

bit 1 (the LSb) of the uint32

Definition at line 247 of file all_generic.h.

unsigned UINT32::b10

bit 10 of the uint32

Definition at line 274 of file all_generic.h.

unsigned UINT32::b11

bit 11 of the uint32

Definition at line 277 of file all_generic.h.

unsigned UINT32::b12

bit 12 of the uint32

Definition at line 280 of file all_generic.h.

unsigned UINT32::b13

bit 13 of the uint32

Definition at line 283 of file all_generic.h.

unsigned UINT32::b14

bit 14 of the uint32

Definition at line 286 of file all_generic.h.

unsigned UINT32::b15

bit 15 of the uint32

Definition at line 289 of file all_generic.h.

unsigned UINT32::b16

bit 16 of the uint32

Definition at line 292 of file all_generic.h.

unsigned UINT32::b17

bit 17 of the uint32

Definition at line 295 of file all_generic.h.

unsigned UINT32::b18

bit 18 of the uint32

Definition at line 298 of file all_generic.h.

unsigned UINT32::b19

bit 19 of the uint32

Definition at line 301 of file all_generic.h.

unsigned UINT32::b2

bit 2 of the uint32

Definition at line 250 of file all_generic.h.

unsigned UINT32::b20

bit 20 of the uint32

Definition at line 304 of file all_generic.h.

unsigned UINT32::b21

bit 21 of the uint32

Definition at line 307 of file all_generic.h.

unsigned UINT32::b22

bit 22 of the uint32

Definition at line 310 of file all_generic.h.

unsigned UINT32::b23

bit 23 of the uint32

Definition at line 313 of file all_generic.h.

unsigned UINT32::b24

bit 24 of the uint32

Definition at line 316 of file all_generic.h.

unsigned UINT32::b25

bit 25 of the uint32

Definition at line 319 of file all_generic.h.

unsigned UINT32::b26

bit 26 of the uint32

Definition at line 322 of file all_generic.h.

unsigned UINT32::b27

bit 27 of the uint32

Definition at line 325 of file all_generic.h.

unsigned UINT32::b28

bit 28 of the uint32

Definition at line 328 of file all_generic.h.

unsigned UINT32::b29

bit 29 of the uint32

Definition at line 331 of file all_generic.h.

unsigned UINT32::b3

bit 3 of the uint32

Definition at line 253 of file all_generic.h.

unsigned UINT32::b30

bit 30 of the uint32

Definition at line 334 of file all_generic.h.

unsigned UINT32::b31

bit 31 (MSb) of the uint32

Definition at line 337 of file all_generic.h.

unsigned UINT32::b4

bit 4 of the uint32

Definition at line 256 of file all_generic.h.

unsigned UINT32::b5

bit 5 of the uint32

Definition at line 259 of file all_generic.h.

unsigned UINT32::b6

bit 6 of the uint32

Definition at line 262 of file all_generic.h.

unsigned UINT32::b7

bit 7 of the uint32

Definition at line 265 of file all_generic.h.

unsigned UINT32::b8

bit 8 of the uint32

Definition at line 268 of file all_generic.h.

unsigned UINT32::b9

bit 9 of the uint32

Definition at line 271 of file all_generic.h.

uint16 UINT32::u16HiWord

The most-significant uint16 in the 32-bit data

Definition at line 232 of file all_generic.h.

uint16 UINT32::u16LoWord

The least-significant uint16 in the 32-bit data

Definition at line 230 of file all_generic.h.

uint16 UINT32::u16Words[2]

The uint32 viewed as an array of two (2) uint16s

Definition at line 236 of file all_generic.h.

uint32 UINT32::u32

uint32 viewed as an uint32

Definition at line 217 of file all_generic.h.

uint8 UINT32::u8Bytes[4]

The uint32 viewed as an array of four (4) uint8s

Definition at line 240 of file all_generic.h.

uint8 UINT32::u8HiLsb

The LSB of the most-signficant uint16 in the 32-bit data

Definition at line 224 of file all_generic.h.

uint8 UINT32::u8HiMsb

The MSB of the most-signficant uint16 in the 32-bit data

Definition at line 226 of file all_generic.h.

uint8 UINT32::u8LoLsb

The LSB of the least-signficant uint16 in the 32-bit data

Definition at line 220 of file all_generic.h.

uint8 UINT32::u8LoMsb

The MSB of the least-signficant uint16 in the 32-bit data

Definition at line 222 of file all_generic.h.


The documentation for this union was generated from the following file: