STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
macros to extract certaing number of bits from a variable

Macros

#define GET_LOW_NIBBLE(x)
 
#define GET_HIGH_NIBBLE(x)
 
#define GET_HIGH_BYTE(x)
 

Detailed Description

Macro Definition Documentation

◆ GET_HIGH_BYTE

#define GET_HIGH_BYTE ( x)
Value:
( ( x ) >> 8u )

get hte MSB from and 16 bit variable

◆ GET_HIGH_NIBBLE

#define GET_HIGH_NIBBLE ( x)
Value:
( ( x ) >> 4u )

get the four most significant nibble

◆ GET_LOW_NIBBLE

#define GET_LOW_NIBBLE ( x)
Value:
( (x)&0xFu )

get the less significant bits