embedded-software
reusable software modules for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
union8_t Union Reference

#include <int_def.h>

Data Fields

uint8_t b
 byte member More...
 
struct {
   uint8_t   b0:1
 
   uint8_t   b1:1
 
   uint8_t   b2:1
 
   uint8_t   b3:1
 
   uint8_t   b4:1
 
   uint8_t   b5:1
 
   uint8_t   b6:1
 
   uint8_t   b7:1
 
bits
 bitfield member, b0 LSb, b7 MSb More...
 
struct {
   uint8_t   low:4
 
   uint8_t   high:4
 
nibble
 

Detailed Description

8-bit union type

Example usage

x.b = 1; // same as x.bits.b0 = 1
x.bits.b2 = 1; // same as x.b |= 4
// x now equals 5

Field Documentation

uint8_t b

byte member

uint8_t b0
uint8_t b1
uint8_t b2
uint8_t b3
uint8_t b4
uint8_t b5
uint8_t b6
uint8_t b7
struct { ... } bits

bitfield member, b0 LSb, b7 MSb

uint8_t high
uint8_t low
struct { ... } nibble

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