7#define bit_read(value, bit) (((value) >> (bit)) & 0x01)
8#define bit_set(value, bit) \
10 __typeof__(value) _one = (1); \
11 (value) |= (_one << (bit)); \
13#define bit_clear(value, bit) \
15 __typeof__(value) _one = (1); \
16 (value) &= ~(_one << (bit)); \
18#define bit_write(value, bit, bitvalue) (bitvalue ? bit_set(value, bit) : bit_clear(value, bit))
19#define DURATION_DIFF(x, y) (((x) < (y)) ? ((y) - (x)) : ((x) - (y)))
32uint64_t subghz_protocol_blocks_reverse_key(uint64_t key, uint8_t bit_count);
41uint8_t subghz_protocol_blocks_get_parity(uint64_t key, uint8_t bit_count);
52uint8_t subghz_protocol_blocks_crc4(
53 uint8_t
const message[],
67uint8_t subghz_protocol_blocks_crc7(
68 uint8_t
const message[],
84uint8_t subghz_protocol_blocks_crc8(
85 uint8_t
const message[],
100uint8_t subghz_protocol_blocks_crc8le(
101 uint8_t
const message[],
116uint16_t subghz_protocol_blocks_crc16lsb(
117 uint8_t
const message[],
131uint16_t subghz_protocol_blocks_crc16(
132 uint8_t
const message[],
147uint8_t subghz_protocol_blocks_lfsr_digest8(
148 uint8_t
const message[],
163uint8_t subghz_protocol_blocks_lfsr_digest8_reflect(
164 uint8_t
const message[],
179uint16_t subghz_protocol_blocks_lfsr_digest16(
180 uint8_t
const message[],
192uint8_t subghz_protocol_blocks_add_bytes(uint8_t
const message[],
size_t size);
200uint8_t subghz_protocol_blocks_parity8(uint8_t
byte);
209uint8_t subghz_protocol_blocks_parity_bytes(uint8_t
const message[],
size_t size);
218uint8_t subghz_protocol_blocks_xor_bytes(uint8_t
const message[],
size_t size);