DEBUG_FUNC char *byte_to_binary(uint8_t byte)
{
    char *bits = malloc(sizeof(char) * 9);
    if (NULL == bits) {
        return bits;
    }

    for (uint8_t i = 0; i < 8; i++) {
        bits[i] = byte & (128 >> i) ? '1' : '0';
    }
    bits[8] = '\0';

    return bits;
}
DEBUG_FUNC char *byte_to_binary(uint8_t byte)
{
    char *bits = malloc(sizeof(char) * 9);
    if (NULL == bits) {
        return bits;
    }

    for (uint8_t i = 0; i < 8; i++) {
        bits[i] = byte & (128 >> i) ? '1' : '0';
    }
    bits[8] = '\0';

    return bits;
}