[FL-1369, FL-1397, FL-1420] IRDA + SDcard (#513)

* Add saving to SD-Card (not ready yet)
* Add saving to SD-card (done)
* Select previous menu item
* Fix central button
* Fix current_button
* Refactoring
* Add notifications
* [FL-1417] Add IRDA CLI
  CLI commands:
  1) ir_rx
  Receives all IR-trafic, decodes and prints result to stdout
  2) ir_tx <protocol> <address> <command>
  Transmits IR-signal. Address and command are hex-formatted
* Fix BUG with random memory corruption at random time in random place in random universe in random unknown space and time forever amen
* Fix submenu set_selected_item
* Bring protocol order back
* Add TODO sdcard check
This commit is contained in:
Albert Kharisov
2021-06-09 16:04:49 +03:00
committed by GitHub
parent 498ffe8d2c
commit 6c74ea65c2
31 changed files with 846 additions and 178 deletions
+17
View File
@@ -11,6 +11,7 @@ typedef struct IrdaHandler IrdaHandler;
// Do not change protocol order, as it can be saved into memory and fw update can be performed!
typedef enum {
IrdaProtocolUnknown = -1,
IrdaProtocolSamsung32 = 0,
IrdaProtocolNEC = 1,
IrdaProtocolNECext = 2,
@@ -74,6 +75,14 @@ void irda_send(const IrdaMessage* message, int times);
*/
const char* irda_get_protocol_name(IrdaProtocol protocol);
/**
* Get protocol enum by protocol name.
*
* \param[in] protocol_name - string to protocol name.
* \return protocol identifier.
*/
IrdaProtocol irda_get_protocol_by_name(const char* protocol_name);
/**
* Get address length by protocol enum.
*
@@ -90,6 +99,14 @@ uint8_t irda_get_protocol_address_length(IrdaProtocol protocol);
*/
uint8_t irda_get_protocol_command_length(IrdaProtocol protocol);
/**
* Checks whether protocol valid.
*
* \param[in] protocol - protocol identifier.
* \return true if protocol is valid, false otherwise.
*/
bool irda_is_protocol_valid(IrdaProtocol protocol);
#ifdef __cplusplus
}
#endif