[FL-1250, FL-1252, FL-1323, FL-1324] New IRDA Application (part 1) (#497)
* Add new IrdaApp (half ready), add ButtonMenu * Fix NEC's extension * clang-format * Fix leak * Add submenu optional header * IRDA: add Edit button * clang-format * IrdaApp: Fix scene flow * Add IRDA NEC extended protocol * IRDA: Add address/command length Co-authored-by: SG <who.just.the.doctor@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@ typedef struct IrdaHandler IrdaHandler;
|
||||
typedef enum {
|
||||
IrdaProtocolSamsung32 = 0,
|
||||
IrdaProtocolNEC = 1,
|
||||
IrdaProtocolNECext = 2,
|
||||
} IrdaProtocol;
|
||||
|
||||
typedef struct {
|
||||
@@ -50,6 +51,13 @@ const IrdaMessage* irda_decode(IrdaHandler* handler, bool level, uint32_t durati
|
||||
*/
|
||||
void irda_free_decoder(IrdaHandler* handler);
|
||||
|
||||
/**
|
||||
* Reset IRDA decoder.
|
||||
*
|
||||
* \param[in] handler - handler to irda decoders. Should be aquired with \c irda_alloc_decoder().
|
||||
*/
|
||||
void irda_reset_decoder(IrdaHandler* handler);
|
||||
|
||||
/**
|
||||
* Send message over IRDA.
|
||||
*
|
||||
@@ -66,6 +74,22 @@ void irda_send(const IrdaMessage* message, int times);
|
||||
*/
|
||||
const char* irda_get_protocol_name(IrdaProtocol protocol);
|
||||
|
||||
/**
|
||||
* Get address length by protocol enum.
|
||||
*
|
||||
* \param[in] protocol - protocol identifier.
|
||||
* \return length of address in nibbles.
|
||||
*/
|
||||
uint8_t irda_get_protocol_address_length(IrdaProtocol protocol);
|
||||
|
||||
/**
|
||||
* Get command length by protocol enum.
|
||||
*
|
||||
* \param[in] protocol - protocol identifier.
|
||||
* \return length of command in nibbles.
|
||||
*/
|
||||
uint8_t irda_get_protocol_command_length(IrdaProtocol protocol);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user