Nützliche Makros und Funktionen.
More...
Nützliche Makros und Funktionen.
- Version
- Id
- utils.h 8541 2010-03-15 22:01:12Z fabian
◆ DEBUG_PRINT
#define DEBUG_PRINT |
( |
|
s, |
|
|
|
... |
|
) |
| |
◆ bit_count32()
static uint8_t bit_count32 |
( |
uint32_t |
n | ) |
|
|
inlinestatic |
Zählt die Anzahl der gesetzten Bits in einem Byte.
- Parameters
-
n | Wert der verarbeitet werden soll. |
- Returns
- Anzahl der gesetzten Bits (0..32)
Definition at line 344 of file utils.h.
◆ bit_count8()
static uint8_t bit_count8 |
( |
uint8_t |
n | ) |
|
|
inlinestatic |
◆ read_and_replace_atomar()
static uint8_t read_and_replace_atomar |
( |
volatile uint8_t * |
data, |
|
|
uint8_t |
new_data |
|
) |
| |
|
inlinestatic |
atomare Operationen
Definition at line 138 of file utils.h.
◆ swap()
static uint8_t swap |
( |
uint8_t |
x | ) |
|
|
inlinestatic |
Dreht die beiden Nibble in einem Byte um.
- Parameters
-
x | Byte das verarbeitet werden soll. |
Definition at line 289 of file utils.h.