1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#ifndef __PRINT_BITS_H__
#define __PRINT_BITS_H__
#include <stdint.h>

void print_bits(uint8_t byte);
#define log_bits(byte) do { \
    printf("%s == ", #byte);\
    print_bits(byte);       \
    fputc('\n', stdout);    \
} while(false)

#endif /* end of include guard: __PRINT_BITS_H__ */

© Copyright 2024 Alexander J. Quinn & David Burnett         This content is protected and may not be shared, uploaded, or distributed.