mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-20 00:48:11 -07:00
added DigitalSequence and PulseReader (#2070)
* added DigitalSequence to chain multiple DigitalSignals added PulseReader for hardware assisted digital signal sampling * added send_time option to start a signal at a specific DWT->CYCCNT value * fixed linter errors and undone function renaming * fixed renaming * flagged functions in api_symbols.csv * allow gpio field to stay uninitialized in digital_signal_prepare_arr() * fix test cases to match (expected) implementation * pulse_reader: build as static library Signed-off-by: g3gg0.de <git@g3gg0.de> * fix starting level detection in pulse_reader * added unit test for pulse_reader * change pulse reader test timings to 1, 10 and 100 ms * fine tuned timings for pulse_reader test * pulse_reader_stop now deinits GPIO as recommended by @gornekich * ran format_py * pulse_reader: remove from API, allow to link with faps Signed-off-by: g3gg0.de <git@g3gg0.de> * remove unit test for pulse_reader again * pulse_reader: add call to set GPIO pull direction * make structures private, add C implementation of digital_signal_update_dma() * digital_signal/pulse_reader: allow parameters for free to be NULL * digital_signal: show unoptimized and optimized code for digital_signal_update_dma() next to each other * pulse_reader: further optimize assembly code * digital_signal: reduce code complexity of digital_signal_update_dma() by only reconfiguring DMA2 * digital_signal: remove assembly code, limiting the performance but increasing portability * added recovery if the timer already expired * digital_signal: fix memory leak * digital_signal: keep lock until all DMA transfers have finished * DigitalSequence: fix issues with concatenation of same levels and spurious bit flips * DigitalSignal: use cyclic DMA buffer for sequences * update api_symbols.csv * Update api_symbols.csv for f18 target * Patches from @gornekich to fix linter warnings. * Remove some redundant if checks * Remove some magic numbers and reformat. * Remove forced terminating edge. Signed-off-by: g3gg0.de <git@g3gg0.de> Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: Tiernan Messmer <tiernan.messmer@gmail.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,26.1,,
|
||||
Version,+,26.2,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
Header,+,applications/services/cli/cli_vcp.h,,
|
||||
@@ -156,6 +156,7 @@ Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_tim.h,,
|
||||
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_usart.h,,
|
||||
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_utils.h,,
|
||||
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_wwdg.h,,
|
||||
Header,+,lib/pulse_reader/pulse_reader.h,,
|
||||
Header,+,lib/toolbox/args.h,,
|
||||
Header,+,lib/toolbox/crc32_calc.h,,
|
||||
Header,+,lib/toolbox/dir_walk.h,,
|
||||
@@ -1575,6 +1576,15 @@ Function,+,protocol_dict_render_brief_data,void,"ProtocolDict*, FuriString*, siz
|
||||
Function,+,protocol_dict_render_data,void,"ProtocolDict*, FuriString*, size_t"
|
||||
Function,+,protocol_dict_set_data,void,"ProtocolDict*, size_t, const uint8_t*, size_t"
|
||||
Function,-,pselect,int,"int, fd_set*, fd_set*, fd_set*, const timespec*, const sigset_t*"
|
||||
Function,-,pulse_reader_alloc,PulseReader*,"const GpioPin*, uint32_t"
|
||||
Function,-,pulse_reader_free,void,PulseReader*
|
||||
Function,-,pulse_reader_receive,uint32_t,"PulseReader*, int"
|
||||
Function,-,pulse_reader_samples,uint32_t,PulseReader*
|
||||
Function,-,pulse_reader_set_bittime,void,"PulseReader*, uint32_t"
|
||||
Function,-,pulse_reader_set_pull,void,"PulseReader*, GpioPull"
|
||||
Function,-,pulse_reader_set_timebase,void,"PulseReader*, PulseReaderUnit"
|
||||
Function,-,pulse_reader_start,void,PulseReader*
|
||||
Function,-,pulse_reader_stop,void,PulseReader*
|
||||
Function,-,putc,int,"int, FILE*"
|
||||
Function,-,putc_unlocked,int,"int, FILE*"
|
||||
Function,-,putchar,int,int
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,26.1,,
|
||||
Version,+,26.2,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
Header,+,applications/services/cli/cli_vcp.h,,
|
||||
@@ -175,6 +175,7 @@ Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_tim.h,,
|
||||
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_usart.h,,
|
||||
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_utils.h,,
|
||||
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_wwdg.h,,
|
||||
Header,+,lib/pulse_reader/pulse_reader.h,,
|
||||
Header,+,lib/subghz/blocks/const.h,,
|
||||
Header,+,lib/subghz/blocks/decoder.h,,
|
||||
Header,+,lib/subghz/blocks/encoder.h,,
|
||||
@@ -738,6 +739,16 @@ Function,+,dialog_message_set_text,void,"DialogMessage*, const char*, uint8_t, u
|
||||
Function,+,dialog_message_show,DialogMessageButton,"DialogsApp*, const DialogMessage*"
|
||||
Function,+,dialog_message_show_storage_error,void,"DialogsApp*, const char*"
|
||||
Function,-,difftime,double,"time_t, time_t"
|
||||
Function,-,digital_sequence_add,void,"DigitalSequence*, uint8_t"
|
||||
Function,-,digital_sequence_alloc,DigitalSequence*,"uint32_t, const GpioPin*"
|
||||
Function,-,digital_sequence_clear,void,DigitalSequence*
|
||||
Function,-,digital_sequence_free,void,DigitalSequence*
|
||||
Function,-,digital_sequence_send,_Bool,DigitalSequence*
|
||||
Function,-,digital_sequence_set_sendtime,void,"DigitalSequence*, uint32_t"
|
||||
Function,-,digital_sequence_set_signal,void,"DigitalSequence*, uint8_t, DigitalSignal*"
|
||||
Function,-,digital_sequence_timebase_correction,void,"DigitalSequence*, float"
|
||||
Function,-,digital_signal_add,void,"DigitalSignal*, uint32_t"
|
||||
Function,-,digital_signal_add_pulse,void,"DigitalSignal*, uint32_t, _Bool"
|
||||
Function,-,digital_signal_alloc,DigitalSignal*,uint32_t
|
||||
Function,-,digital_signal_append,_Bool,"DigitalSignal*, DigitalSignal*"
|
||||
Function,-,digital_signal_free,void,DigitalSignal*
|
||||
@@ -2168,6 +2179,15 @@ Function,+,protocol_dict_render_brief_data,void,"ProtocolDict*, FuriString*, siz
|
||||
Function,+,protocol_dict_render_data,void,"ProtocolDict*, FuriString*, size_t"
|
||||
Function,+,protocol_dict_set_data,void,"ProtocolDict*, size_t, const uint8_t*, size_t"
|
||||
Function,-,pselect,int,"int, fd_set*, fd_set*, fd_set*, const timespec*, const sigset_t*"
|
||||
Function,-,pulse_reader_alloc,PulseReader*,"const GpioPin*, uint32_t"
|
||||
Function,-,pulse_reader_free,void,PulseReader*
|
||||
Function,-,pulse_reader_receive,uint32_t,"PulseReader*, int"
|
||||
Function,-,pulse_reader_samples,uint32_t,PulseReader*
|
||||
Function,-,pulse_reader_set_bittime,void,"PulseReader*, uint32_t"
|
||||
Function,-,pulse_reader_set_pull,void,"PulseReader*, GpioPull"
|
||||
Function,-,pulse_reader_set_timebase,void,"PulseReader*, PulseReaderUnit"
|
||||
Function,-,pulse_reader_start,void,PulseReader*
|
||||
Function,-,pulse_reader_stop,void,PulseReader*
|
||||
Function,-,putc,int,"int, FILE*"
|
||||
Function,-,putc_unlocked,int,"int, FILE*"
|
||||
Function,-,putchar,int,int
|
||||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
"flipperformat",
|
||||
"toolbox",
|
||||
"nfc",
|
||||
"pulse_reader",
|
||||
"microtar",
|
||||
"usb_stm32",
|
||||
"st25rfal002",
|
||||
|
||||
Reference in New Issue
Block a user