Loading...
Searching...
No Matches
encoder.h
1#pragma once
2
3#include <stdbool.h>
4#include <stdint.h>
5#include <stddef.h>
6
7#include <lib/toolbox/level_duration.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct {
14 bool is_running;
15 size_t repeat;
16 size_t front;
17 size_t size_upload;
18 LevelDuration* upload;
19
21
22typedef enum {
23 SubGhzProtocolBlockAlignBitLeft,
24 SubGhzProtocolBlockAlignBitRight,
25} SubGhzProtocolBlockAlignBit;
26
34void subghz_protocol_blocks_set_bit_array(
35 bool bit_value,
36 uint8_t data_array[],
37 size_t set_index_bit,
38 size_t max_size_array);
39
46bool subghz_protocol_blocks_get_bit_array(uint8_t data_array[], size_t read_index_bit);
47
57size_t subghz_protocol_blocks_get_upload_from_bit_array(
58 uint8_t data_array[],
59 size_t count_bit_data_array,
60 LevelDuration* upload,
61 size_t max_size_upload,
62 uint32_t duration_bit,
63 SubGhzProtocolBlockAlignBit align_bit);
64
65#ifdef __cplusplus
66}
67#endif
Definition level_duration.h:15
Definition encoder.h:13