Loading...
Searching...
No Matches
infrared_protocol_rc5.h
1#pragma once
2
3#include "../infrared_i.h"
4
5/***************************************************************************************************
6* RC5 protocol description
7* https://www.mikrocontroller.net/articles/IRMP_-_english#RC5_.2B_RC5X
8****************************************************************************************************
9* Manchester/biphase
10* Modulation
11*
12* 888/1776 - bit (x2 for toggle bit)
13*
14* __ ____ __ __ __ __ __ __ __ __
15* __ __ ____ __ __ __ __ __ __ __ _
16* | 1 | 1 | 0 | ... | ... |
17* s si T address (MSB) command (MSB)
18*
19* Note: manchester starts from space timing, so it have to be handled properly
20* s - start bit (always 1)
21* si - RC5: start bit (always 1), RC5X - 7-th bit of address (in our case always 0)
22* T - toggle bit, change it's value every button press
23* address - 5 bit
24* command - 6/7 bit
25***************************************************************************************************/
26
27void* infrared_decoder_rc5_alloc(void);
28void infrared_decoder_rc5_reset(void* decoder);
29void infrared_decoder_rc5_free(void* decoder);
30InfraredMessage* infrared_decoder_rc5_check_ready(void* ctx);
31InfraredMessage* infrared_decoder_rc5_decode(void* decoder, bool level, uint32_t duration);
32
33void* infrared_encoder_rc5_alloc(void);
34void infrared_encoder_rc5_reset(void* encoder_ptr, const InfraredMessage* message);
35void infrared_encoder_rc5_free(void* decoder);
36InfraredStatus infrared_encoder_rc5_encode(void* encoder_ptr, uint32_t* duration, bool* polarity);
37
38const InfraredProtocolVariant* infrared_protocol_rc5_get_variant(InfraredProtocol protocol);
Definition infrared.h:42
Definition infrared_i.h:19