the function bit_range_zero_p is not strong enough and may be have some fault in it
first ,the calculation of start mask is not correct ,it should use the ‘~’ operator ,or uint8_t start_mask = 0xff >> (start % 8);
second ,for (i = start_byte ; i < end_byte; i++) ,it should not start from the start_byte,instead it should be start_byte+1.
the function doesn't take only one byte into consideration such as bit_range_zero_p(buf,3,6).
I hope there will be some promotion in the future version.
Thanks