[FL-1684] IRDA Add SIRC protocol (#693)

* IRDA HAL: Fill buffer refactoring
* IRDA: Add SIRC protocol
* IRDA: correct adr/cmd bit length
* Disable Unit tests

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Albert Kharisov
2021-09-10 00:37:32 +03:00
committed by GitHub
parent 9bce160ca6
commit fbccb9fbaf
36 changed files with 1216 additions and 223 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include "irda.h"
#include <stddef.h>
#include <stdint.h>
typedef struct {
uint32_t silence_time;
@@ -10,7 +11,7 @@ typedef struct {
uint16_t bit1_space;
uint16_t bit0_mark;
uint16_t bit0_space;
float preamble_tolerance;
uint32_t preamble_tolerance;
uint32_t bit_tolerance;
} IrdaTimings;
@@ -25,10 +26,12 @@ typedef struct {
typedef const IrdaProtocolSpecification* (*IrdaGetProtocolSpec) (IrdaProtocol protocol);
typedef void* (*IrdaAlloc) (void);
typedef IrdaMessage* (*IrdaDecode) (void* ctx, bool level, uint32_t duration);
typedef void (*IrdaReset) (void*);
typedef void (*IrdaFree) (void*);
typedef void (*IrdaDecoderReset) (void*);
typedef IrdaMessage* (*IrdaDecode) (void* ctx, bool level, uint32_t duration);
typedef IrdaMessage* (*IrdaDecoderCheckReady) (void*);
typedef void (*IrdaEncoderReset)(void* encoder, const IrdaMessage* message);
typedef IrdaStatus (*IrdaEncode)(void* encoder, uint32_t* out, bool* polarity);