[FL-1472, FL-1596, FL-1673] IRDA: stability improvements (#655)

- Restrict with 31 bytes length for remote and signal name
- Don't stuck for 0 PWM cycle timings
- Support timings > 65535 PWM cycles
- Fix remote file open error
- Add IRDA TX debug redirect
- Add remote parse error print, improve parsing, support tabs
- Fix stucks with uncorrect RAW signal values, long strings in remote file, etc
- Fix HAL signals capturing (save previous read value)
- Fix leak in case of failed parsing
This commit is contained in:
Albert Kharisov
2021-08-19 03:18:42 +03:00
committed by GitHub
parent 9d38f28de7
commit 5f6aff2255
19 changed files with 347 additions and 177 deletions

View File

@@ -7,8 +7,10 @@
extern "C" {
#endif
#define IRDA_MAX_FREQUENCY 56000
#define IRDA_MIN_FREQUENCY 10000
typedef enum {
FuriHalIrdaTxGetDataStateError, /* An error occured during transmission */
FuriHalIrdaTxGetDataStateOk, /* New data obtained */
FuriHalIrdaTxGetDataStateDone, /* New data obtained, and this is end of package */
FuriHalIrdaTxGetDataStateLastDone, /* New data obtained, and this is end of package and no more data available */
@@ -103,10 +105,8 @@ void furi_hal_irda_async_tx_set_data_isr_callback(FuriHalIrdaTxGetDataISRCallbac
*
* @param[in] freq - frequency for PWM
* @param[in] duty_cycle - duty cycle for PWM
* @return true if transmission successfully started, false otherwise.
* If start failed no need to free resources.
*/
bool furi_hal_irda_async_tx_start(uint32_t freq, float duty_cycle);
void furi_hal_irda_async_tx_start(uint32_t freq, float duty_cycle);
/**
* Stop IR asynchronous transmission and free resources.