Loading...
Searching...
No Matches
infrared_protocol_rc6.h
1#pragma once
2
3#include "../infrared_i.h"
4
5/***************************************************************************************************
6* RC6 protocol description
7* https://www.mikrocontroller.net/articles/IRMP_-_english#RC6_.2B_RC6A
8****************************************************************************************************
9* Preamble Manchester/biphase Silence
10* mark/space Modulation
11*
12* 2666 889 444/888 - bit (x2 for toggle bit) 2666
13*
14* ________ __ __ __ __ ____ __ __ __ __ __ __ __ __
15* _ _________ ____ __ __ ____ __ __ __ __ __ __ __ __ _______________
16* | 1 | 0 | 0 | 0 | 0 | ... | ... | |
17* s m2 m1 m0 T address (MSB) command (MSB)
18*
19* s - start bit (always 1)
20* m0-2 - mode (000 for RC6)
21* T - toggle bit, twice longer
22* address - 8 bit
23* command - 8 bit
24***************************************************************************************************/
25
26void* infrared_decoder_rc6_alloc(void);
27void infrared_decoder_rc6_reset(void* decoder);
28void infrared_decoder_rc6_free(void* decoder);
29InfraredMessage* infrared_decoder_rc6_check_ready(void* ctx);
30InfraredMessage* infrared_decoder_rc6_decode(void* decoder, bool level, uint32_t duration);
31
32void* infrared_encoder_rc6_alloc(void);
33void infrared_encoder_rc6_reset(void* encoder_ptr, const InfraredMessage* message);
34void infrared_encoder_rc6_free(void* decoder);
35InfraredStatus infrared_encoder_rc6_encode(void* encoder_ptr, uint32_t* duration, bool* polarity);
36
37const InfraredProtocolVariant* infrared_protocol_rc6_get_variant(InfraredProtocol protocol);
Definition infrared.h:42
Definition infrared_i.h:19