Commit graph

11 commits

Author SHA1 Message Date
Georgii Surkov
139660d206
[FL-3846] Event Loop Timers (#3721)
* Implement POC event loop tmers (not all edge cases are handled)
* Use a separate ready list to allow for (re)starting and stopping of timers from callback
* Improve the test application
* Improve timer API and test application
* Improve timeout calculation logic
* Improve timer API, update documentation
* Fix API usage error
* Update doxygen comments
* Revert the old (correct) check
* Improve function naming
* Check whether a timer was on the expired list before processing it
* Implement tick callback
* Add critical sections to improve timer consistency
* Simplify event loop timer API
* Remove redundant search
* Refactor timer logic, use message queue
* Simplify FuriEventLoopTimer API
* Improve event loop timer logic
* Update the f18 target
* Remove superfluous clears
* Correct f18 api symbols
* Fix doxygen comments
* Update .pvsconfig
* Use a double push list instead of deque
* Update .pvsconfig
* Add pending callback functionality
* Restore unprocessed flags when applicable
* Refactor Dolphin app to use FuriEventLoop
* Improve naming
* Update naming some more
* Fix a typo Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
* Fix wait time in example
* Bump API version
* Debug: multiple of 25 timings in event loop blink test
* Separate FuriEventLoopTimer to its own set of files
* Improve start time calculation for periodic timers
* Do not use dynamic allocations for timer requests
* Split the tick functionality in separate files, rearrange code
* Improve timer queue handling
* Properly reset GPIO pins in the test app
* Properly initialise GPIO pins in the test app too
* Furi: variable naming in event loop
* Furi: fix spelling in event loop

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
2024-07-02 13:09:50 +01:00
あく
ca8517a1b0
Cli: top (#3707)
* Cli: top command to replace ps. Furi: ThreadList and thread enumeration routine.
* Sync API Symbols
* Cli: cleanup top output, add memory section. Furi: thread enumeration code cleanup. Fix doxygen and make pvs happy.
* Furi: iterator in thread_list instead of M_EACH, fix memory leak
* Update documentation
* Cli: customizable refres interval for top command
* Furi: add consistentency into float declaration in thread list
* FreeRTOSConfig: remove invalid comment

Co-authored-by: Sergei Gavrilov <who.just.the.doctor@gmail.com>
2024-06-13 18:07:13 +01:00
あく
6d8b050eda
[FL-3833] Furi: event loop (#3675)
* Furi: epoll prototype

* Gui: simplify view_dispatcher custom event processing

* Furi: add missing critical sections to epoll

* Furi: add epoll unit tests, fully implement level processing for in and out events

* Furi: properly trigger epoll item event on adding mq, update tests.

* Unit tests: cleanup defines

* Furi: protect epoll from modification in callback

* Furi: rename epoll into event_loop, cleanup api naming

* Sync API Symbols

* Furi: add event loop contract and link api, port mq to new api, cleanup code

* Format Sources

* Furi: cleanup mq and event loop code

* Furi: remove unused staff from message queue

* ApiSymbols: remove event loop from public APIs.

* Fix furi unit tests

---------

Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2024-06-10 20:53:08 +03:00
あく
acc39a4bc0
Api Symbols: replace asserts with checks (#3507)
* Api Symbols: replace asserts with checks
* Api Symbols: replace asserts with checks part 2
* Update no args function signatures with void, to help compiler to track incorrect usage
* More unavoidable void
* Update PVS config and code to make it happy
* Format sources
* nfc: fix checks
* dead code cleanup & include fixes

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2024-03-19 23:43:52 +09:00
あく
aa06328516
Furi, FuriHal: remove FreeRTOS headers leaks (#3179)
* Furi: remove direct FreeRTOS timers use
* Furi: eliminate FreeRTOS headers leak. What did it cost? Everything...
* SubGhz: proper public api for protocols. Format Sources.
* Furi: slightly less redundant declarations
* Desktop: proper types in printf
* Sync API Symbols
* Furi: add timer reset and fix dolphin service, fix unit tests
* Furi: proper timer restart method naming and correct behavior in timer stopped state.

---------

Co-authored-by: hedger <hedger@nanode.su>
2023-11-01 11:24:11 +04:00
gornekich
3d872cf37a
[FL-3637] NFC RC fixes (#3165)
* firmware: remove nfc lib build settings section
* furi hal nfc: fix nfc irq gpio deinit
* lib nfc: remove deprecated exception from sources
* nfc: use ASK demodulator in transparent mode
* mf ultralight: add upper page bound for NTAGI2C1K
* furi hal nfc: set event if nfc event was started
* nfc: fix PVS warnings
* lib signal reader: remove gpio pull setting in alloc
* furi: added math.h include for compatibility with existing apps
* nfc: remove resolved TODO in mf desfire poller
* bump api symbol version

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: あく <alleteam@gmail.com>
2023-10-28 23:22:07 +09:00
Astra
9819306731
[Fl-3147] Remove ValueMutex (#2467)
* Move keypad_test to furi_mutex
* Move text_box_test to furi_mutex
* Move snake_game to furi_mutex
* Remove ValueMutex completely
* Snake Game: simplify code and fix PVS warning
* F18: sync API symbols

Co-authored-by: あく <alleteam@gmail.com>
2023-03-07 22:09:45 +09:00
Sergey Gavrilov
38a82a1907
[FL-2839] Furi stream buffer (#1834)
* Core: stream buffer
* stream buffer: API and usage
* stream buffer: documentation
* stream buffer: more documentation
* Furi: fix spelling

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-10-07 21:27:11 +09:00
Sergey Gavrilov
4bf29827f8
M*LIB: non-inlined strings, FuriString primitive (#1795)
* Quicksave 1
* Header stage complete
* Source stage complete
* Lint & merge fixes
* Includes
* Documentation step 1
* FBT: output free size considering BT STACK
* Documentation step 2
* py lint
* Fix music player plugin
* unit test stage 1: string allocator, mem, getters, setters, appends, compare, search.
* unit test: string equality
* unit test: string replace
* unit test: string start_with, end_with
* unit test: string trim
* unit test: utf-8
* Rename
* Revert fw_size changes
* Simplify CLI backspace handling
* Simplify CLI character insert
* Merge fixes
* Furi: correct filenaming and spelling
* Bt: remove furi string include

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-10-06 00:15:23 +09:00
SG
bc34689ed6
Make printf great again (#1438)
* Printf lib: wrap *printf* functions
* Printf lib, FW: drop sprintf. Dolphin: dump timestamp as is, wo asctime.
* FW: remove sniprintf, wrap assert functions
* Printf lib: wrap putc, puts, putchar
* Printf: a working but not thread-safe concept.
* Poorly wrap fflush
* stdglue: buffers
* Core: thread local buffers
* Core: move stdglue to thread api, add ability to get FuriThread instance of current thread.
* RPC tests: replace sprintf with snprintf
* Applications: use new stdout api
* Printf lib: wrap more printf-like and stdout functions
* Documentation
* Apps: snprintf size fixes

Co-authored-by: あく <alleteam@gmail.com>
2022-08-04 01:00:17 +09:00
あく
e3c7201a20
Furi: core refactoring and CMSIS removal part 2 (#1410)
* Furi: rename and move core
* Furi: drop CMSIS_OS header and unused api, partially refactor and cleanup the rest
* Furi: CMSIS_OS drop and refactoring.
* Furi: refactoring, remove cmsis legacy
* Furi: fix incorrect assert on queue deallocation, cleanup timer
* Furi: improve delay api, get rid of floats
* hal: dropped furi_hal_crc
* Furi: move DWT based delay to cortex HAL
* Furi: update core documentation

Co-authored-by: hedger <hedger@nanode.su>
2022-07-20 13:56:33 +03:00