mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-26 14:51:52 +03:00
d1d3c43939
* add support for Pioneer SR IR remotes * fix minor issues * fix repeat * Fix protocol enumeration order * Add unit tests for Pioneer IR protocol * Clean up raw test data * Add encoder/decoder tests, modify parser * Remove dead code * Use loops where appropriate Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com> Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
37 lines
1.7 KiB
C
37 lines
1.7 KiB
C
#pragma once
|
|
|
|
#include "../infrared_i.h"
|
|
|
|
/***************************************************************************************************
|
|
* Pioneer SR protocol description
|
|
* http://www.adrian-kingston.com/IRFormatPioneer.htm
|
|
****************************************************************************************************
|
|
* Preamble Preamble Pulse Width Modulation Pause Entirely repeat
|
|
* mark space up to period message..
|
|
*
|
|
* 8500 4250 33 bits (500, 1500) ...26000 8500 4250
|
|
* __________ _ _ _ _ _ _ _ _ _ _ _ _ _ __________ _ _
|
|
* ____ __________ _ _ _ __ __ __ _ _ __ __ _ _ ____________________ __________ _
|
|
*
|
|
* In 33 bits of data there is:
|
|
* - 8 bits address
|
|
* - 8 bits address inverse
|
|
* - 8 bits command
|
|
* - 8 bits command inverse
|
|
* - 1 stop bit
|
|
***************************************************************************************************/
|
|
|
|
void* infrared_decoder_pioneer_alloc(void);
|
|
void infrared_decoder_pioneer_reset(void* decoder);
|
|
InfraredMessage* infrared_decoder_pioneer_check_ready(void* decoder);
|
|
void infrared_decoder_pioneer_free(void* decoder);
|
|
InfraredMessage* infrared_decoder_pioneer_decode(void* decoder, bool level, uint32_t duration);
|
|
|
|
void* infrared_encoder_pioneer_alloc(void);
|
|
void infrared_encoder_pioneer_reset(void* encoder_ptr, const InfraredMessage* message);
|
|
void infrared_encoder_pioneer_free(void* decoder);
|
|
InfraredStatus
|
|
infrared_encoder_pioneer_encode(void* encoder_ptr, uint32_t* duration, bool* polarity);
|
|
|
|
const InfraredProtocolVariant* infrared_protocol_pioneer_get_variant(InfraredProtocol protocol);
|