Commit graph

289 commits

Author SHA1 Message Date
MX
56530ee61c
Merge remote-tracking branch 'OFW/dev' into dev 2024-09-05 22:10:41 +03:00
porta
c9791a280a
[FL-3884] Proper integer parsing (#3839)
* feat: strint_to_uint32 and tests
* fix: permit explicit bases and prefixes
* feat: strint_to_{int32,uint16,int16}
* feat: strint_to_u?int64
* refactor: replace strtol, strtoul, sscanf with strint_to_*
* fix: api symbols
* docs: document parameter `end` of strint_to_uint_32
* style: apply changes requested by hedger
* refactor: fix pvs-studio diagnostic
* style: apply changes requested by CookiePLMonster
* fix: unused var
* fix: pointer type
* refactor: convert atoi to strint_to_*
* fix: strint_to_uint8 doesn't actually exist ._ .
* fix: memory leak
* style: address review comments
* Toolbox: couple small comments in the code and doxygen comment update. SubGhz, Loader: fix strint usage.
* Loader: fix incorrect cast

Co-authored-by: あく <alleteam@gmail.com>
2024-09-05 18:02:42 +01:00
Filipe Paz Rodrigues
4a58930247
CCID: App changes (#3837)
- Keep ccid_callback and buffer as private to the iso7816_handler
- set usb ccid callback from iso7816_handler (to ensure the right structure is being passed)
- make iso7816 related code independent from furi related code (goal is to make it independently testable)
- rename vars

Co-authored-by: あく <alleteam@gmail.com>
2024-09-05 16:04:32 +01:00
Georgii Surkov
fa2d611652
[FL-3889] 5V on GPIO control for ext. modules (#3830)
* Make file extensions case-insensitive
* Bump protobuf version
* Add support for 5V control via RPC
* Add support for 5V control via Expansion protocol
* Update running instructions
* Update expansion module documentation
* Prettify condition
* Test RPC OTG control as well
* Assets: bump protobuf version
* Disable PVS license expiration check, fix PVS warnings

Co-authored-by: あく <alleteam@gmail.com>
2024-09-05 15:40:14 +01:00
MX
8fd8e4f3d9
Add marantec24 and gangqi protocols
Protocols by @xMasterX / captures for gangqi by @mishamyte
2024-09-04 03:16:30 +03:00
MX
821f5bab18
Merge remote-tracking branch 'OFW/dev' into dev 2024-08-10 14:47:38 +03:00
MX
bf6c6c231f
[FL-3841] FuriEventLoop Pt.2 (#3703)
* Abstract primitive type from main logic in FuriEventLoop
* Remove message_queue_i.h
* Add stream buffer support for event loop
* Add semaphore support for event loop
* Add temporary unit test workaround
* Make the linter happy
* Add mutex support for event loop
* Implement event subscription and unsubscription while the event loop is running
* Implement edge events
* Fix leftover logical errors
* Add event loop timer example application
* Implement flag-based edge trigger and one-shot mode
* Add event loop mutex example application
* Only notify the event loop if stream buffer is at or above its trigger level
* Reformat comments
* Add event loop stream buffer example application
* Add event loop multiple elements example application
* Improve event loop flag names
* Remove redundant signal handler as it is already handled by the event loop
* Refactor Power service, improve ViewHolder
* Use ViewHolder instead of ViewDispatcher in About app
* Enable ViewDispatcher queue on construction, deprecate view_dispatcher_enable_queue()
* Remove all invocations of view_dispatcher_enable_queue()
* Remove app-scened-template
* Remove missing library from target.json
* Port Accessor app to ViewHolder
* Make the linter happy
* Add example_view_holder application, update ViewHolder docs
* Add example_view_dispatcher application, update ViewDispatcher docs
* Replace FuriSemaphore with FuriApiLock, remove workaround delay
* Fix logical error
* Fix another logical error
* Use the sources directive to speed up compilation
* Use constant define macro
* Improve FuriEventLoop documentation
* Improve FuriEventLoop documentation once more
* Bump API Version
* Gui: remove redundant checks from ViewDispatcher
* Gui: remove dead ifs from ViewDispatcher

Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-08-10 14:32:27 +03:00
MX
28272f7a7a
Storage: remove LFS (#3577)
* Storage: drop internal storage

* Storage: rollback some unnecessary changes

* Storage: rollback some unnecessary changes part 2

* Storage: cleanup various defines and int handling. Ble: allow short connection interval if internal flash is not used.

* Storage: do not return storage if it is not ready

* Save PIN code to RTC, update settings

* Simplify the code, clean up includes

* Rearrange some code

* apps: storage_move_to_sd: conditionally enable with --extra-define=STORAGE_INT_ON_LFS

* Load Desktop settings automatically

* Redirect /any to /ext

* Abolish storage_move_to_sd app

* Remove as many mentions of ANY_PATH as possible

* Fix desktop settings wrongly not loading

* Improve desktop settings handling and strings

* Load BLE settings and keys automatically

* Improve BLE configuration procedure

* Do not load bluetooth keys twice if they were already loaded

* Load dolphin state automatically

* Fix merge artifact

* Load notification settings automatically

* Update desktop settings strings

* Load expansion settings automatically

* Do not use thread signals to reload desktop settings

* Load region data automatically, separate to its own hook

* Improve ble behaviour with no keys

* Fix Dolphin state not resetting correctly

* Add a status check

* Make Desktop save its own settings

* Check result when taking and releasing mutex

* Improve default thread signal handling in FuriEventLoop

* Make bt service in charge of saving settings, add settings api

* Fix a deadlock due to timer thread not receiving time

* Lock core2 when reinitialising bt

* Update clang-format

* Revert "Update clang-format"

This reverts commit d61295ac063c6ec879375ceeab54d6ff2c90a9a1.

* Format sources with clang-format

* Revert old stack size for desktop settings

* Allocate big struct dynamically

* Simplify PIN comparison

* Save pointer to storage in Desktop object

* Fix region provisioning for hardware regions

* Remove stale TODO + siimplify code

* Clean up region.c

* Use sizeof instead of macro define

* Limit PIN length to 10 for consistency

* Emit a warning upon usage of /any

* Add delay after finding flipper

* Remove unnecessary delay

* Remove all mentions of STORAGE_INT_ON_LFS

* Remove littlefs and internal storage

* Remove all possible LittleFS mentions

* Fix browser tab in Archive

* Ble: fix connection interval explanation

* Bump API Symbols

* BLE: Update comments interval connection comments

* Storage: clear FuriHalRtcFlagStorageFormatInternal if set

---------

Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2024-08-10 13:18:51 +03:00
daubsi
4f75d92747
Added protocol for Dickert MAHS garage door remote control (#3826)
* Added Dickert MAHS protocol
* Update protocol_items.c
* Added Dickert MAHS protocol reference
* Update protocol_items.h
* Removed logging and some defines
* Reworked the send code to properly adhere to Dickert timings
* Added subghz unit test for Dickert MAHS
* Minor fix in encoding length
* Added Dickert Decoder Test to subghz unit tests and set repeat=10
* SubGhz: cleanup dickert mahs code and documentation
* SubGhz: correct type in for statement in dickert mahs

Co-authored-by: あく <alleteam@gmail.com>
2024-08-09 17:24:57 +09:00
Georgii Surkov
f4122a924a
[FL-3841] FuriEventLoop Pt.2 (#3703)
* Abstract primitive type from main logic in FuriEventLoop
* Remove message_queue_i.h
* Add stream buffer support for event loop
* Add semaphore support for event loop
* Add temporary unit test workaround
* Make the linter happy
* Add mutex support for event loop
* Implement event subscription and unsubscription while the event loop is running
* Implement edge events
* Fix leftover logical errors
* Add event loop timer example application
* Implement flag-based edge trigger and one-shot mode
* Add event loop mutex example application
* Only notify the event loop if stream buffer is at or above its trigger level
* Reformat comments
* Add event loop stream buffer example application
* Add event loop multiple elements example application
* Improve event loop flag names
* Remove redundant signal handler as it is already handled by the event loop
* Refactor Power service, improve ViewHolder
* Use ViewHolder instead of ViewDispatcher in About app
* Enable ViewDispatcher queue on construction, deprecate view_dispatcher_enable_queue()
* Remove all invocations of view_dispatcher_enable_queue()
* Remove app-scened-template
* Remove missing library from target.json
* Port Accessor app to ViewHolder
* Make the linter happy
* Add example_view_holder application, update ViewHolder docs
* Add example_view_dispatcher application, update ViewDispatcher docs
* Replace FuriSemaphore with FuriApiLock, remove workaround delay
* Fix logical error
* Fix another logical error
* Use the sources directive to speed up compilation
* Use constant define macro
* Improve FuriEventLoop documentation
* Improve FuriEventLoop documentation once more
* Bump API Version
* Gui: remove redundant checks from ViewDispatcher
* Gui: remove dead ifs from ViewDispatcher

Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-08-07 12:49:41 +09:00
Georgii Surkov
0b19fd29e6
[FL-3880] Fix cumulative error in infrared signals (#3823)
* Correct for pulse duration cumulative discrepancy
* Add infrared test application
* Build infrared_test_app for f7 only

Co-authored-by: あく <alleteam@gmail.com>
2024-08-07 12:05:53 +09:00
Sean Skyhawk
41fcead710
Images linting: ensure that all images conform specification (#3802)
* Change all icons to be white background
* assets: re-processed all *.png images to 1-bit
* assets: also stripped profile data from .pngs
* assets: also stripped datetime from metadata (`-define png:exclude-chunks=date,time`)
* scripts: added image linter and formatter; fbt: added `lint_img` && `format_img` targets; github: integrated image lint step into CI
* scripts: imglint: fixed deprecation warning
* images: applied `format_img`
* fbt: added `lint_all` and `format_all` targets; docs: updated for new targets

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-08-07 11:57:32 +09:00
あく
4d985ba8f8
Storage: remove LFS (#3577)
* Storage: drop internal storage

* Storage: rollback some unnecessary changes

* Storage: rollback some unnecessary changes part 2

* Storage: cleanup various defines and int handling. Ble: allow short connection interval if internal flash is not used.

* Storage: do not return storage if it is not ready

* Save PIN code to RTC, update settings

* Simplify the code, clean up includes

* Rearrange some code

* apps: storage_move_to_sd: conditionally enable with --extra-define=STORAGE_INT_ON_LFS

* Load Desktop settings automatically

* Redirect /any to /ext

* Abolish storage_move_to_sd app

* Remove as many mentions of ANY_PATH as possible

* Fix desktop settings wrongly not loading

* Improve desktop settings handling and strings

* Load BLE settings and keys automatically

* Improve BLE configuration procedure

* Do not load bluetooth keys twice if they were already loaded

* Load dolphin state automatically

* Fix merge artifact

* Load notification settings automatically

* Update desktop settings strings

* Load expansion settings automatically

* Do not use thread signals to reload desktop settings

* Load region data automatically, separate to its own hook

* Improve ble behaviour with no keys

* Fix Dolphin state not resetting correctly

* Add a status check

* Make Desktop save its own settings

* Check result when taking and releasing mutex

* Improve default thread signal handling in FuriEventLoop

* Make bt service in charge of saving settings, add settings api

* Fix a deadlock due to timer thread not receiving time

* Lock core2 when reinitialising bt

* Update clang-format

* Revert "Update clang-format"

This reverts commit d61295ac063c6ec879375ceeab54d6ff2c90a9a1.

* Format sources with clang-format

* Revert old stack size for desktop settings

* Allocate big struct dynamically

* Simplify PIN comparison

* Save pointer to storage in Desktop object

* Fix region provisioning for hardware regions

* Remove stale TODO + siimplify code

* Clean up region.c

* Use sizeof instead of macro define

* Limit PIN length to 10 for consistency

* Emit a warning upon usage of /any

* Add delay after finding flipper

* Remove unnecessary delay

* Remove all mentions of STORAGE_INT_ON_LFS

* Remove littlefs and internal storage

* Remove all possible LittleFS mentions

* Fix browser tab in Archive

* Ble: fix connection interval explanation

* Bump API Symbols

* BLE: Update comments interval connection comments

* Storage: clear FuriHalRtcFlagStorageFormatInternal if set

---------

Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2024-08-04 10:54:02 +01:00
MX
856fe752de
Merge remote-tracking branch 'OFW/dev' into dev 2024-08-02 11:09:56 +03:00
Filipe Paz Rodrigues
53cf700521
CCID App: Refactor (#3808)
- Move iso7816 related code to its own folder
- Refactor Iso7816Callback into Iso7816Handler
- Created new file for CCID commands
- Renamed variables according to standard

Co-authored-by: あく <alleteam@gmail.com>
2024-08-01 06:44:04 +09:00
MX
3d46a62f71
Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2024-07-21 03:34:45 +03:00
Filipe Paz Rodrigues
703ed83fd8
CCID: Add CCIDWorker (#3785)
* CCID: Add CCIDWorker
  This new thread allows for Flipper to receive CCID messages bigger than CCID_EPSIZE
  by receiving multiple packaged in a row and adding them to the buffer
* Fixed data types
* Format sources
* Review feedback
* Variable names
* FuriHal: cleanup and fortify code in furi_hal_usb_ccid
* Review feedbacks (also added extra checks)
* Fixed use after free
* Fix lint
* Sync API Symbols version
* Sync API Symbols version again
* FuriHal: fix clangd warnings, add doxygen comments for furi_hal_usb_ccid.h

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-07-18 16:04:38 +09:00
MX
57f3bce8e3
merge manually formatted stuff too 2024-07-16 01:01:17 +03:00
MX
726cb770d0
formatting 2024-07-15 20:02:45 +03:00
hedger
ffa3996a5e
[FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false
* clang-format: InsertNewlineAtEOF: true
* clang-format: Standard:        c++20
* clang-format: AlignConsecutiveBitFields
* clang-format: AlignConsecutiveMacros
* clang-format: RemoveParentheses: ReturnStatement
* clang-format: RemoveSemicolon: true
* Restored RemoveParentheses: Leave, retained general changes for it
* formatting: fixed logging TAGs
* Formatting update for dev

Co-authored-by: あく <alleteam@gmail.com>
2024-07-15 13:38:49 +09:00
MX
a7ca56cf4e
Merge remote-tracking branch 'OFW/dev' into dev 2024-07-07 02:22:08 +03:00
Filipe Paz Rodrigues
1510d8773b
CCID: Improve request and response data handling (#3741)
* CCID: Improve request and response data handling
  - Add iso7816_set_response function: serves a helpers to set SW1 and SW2 values
  - improved iso7816_read_response_apdu by correctly parsing Lc and Le values
  - add client script to make testing easier
* lint and rename
* Format
* Review changes: pragma once, typedef
* Move command/response data and datalen into respective structures
* Remove conditional for Lc=0
* Fix comment: Le
* Make PVS happy and fix spelling

Co-authored-by: あく <alleteam@gmail.com>
2024-07-06 12:08:44 +01:00
hedger
7879876ba1
[FL-3863] toolchain: v37 (#3746)
* toolchain: v36
* toolchain: fixed cert path; lib: nanopb: updated to 0.4.8
* fbtenv: rolled back cert path for 3.11
* clang-format: updated config for v18
* linter fixes
* clang-format: properly regenerated config (`clang-format -style=file:.clang-format -dump-config > .clang-format-new; mv .clang-format-new .clang-format`)
* clang-format: AllowShortLoopsOnASingleLine: false
* toolchain: v37
* fbt: compilation_db.py: fixes for Windows
2024-07-05 18:27:21 +01:00
MX
842922f018
Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2024-07-04 04:56:04 +03:00
RebornedBrain
3224401479
[FL-3835] Ultralight C authentication with des key (#3720)
* Update api_symbols.csv
* Ultralight C 3des implementation added
* Access check for Ultralight cards is now splitted into 2 functions one for ULC card and another for common
* Ultralight C authentication command handlers added
* Update api_symbols.csv and api_symbols.csv
* Length added to ultralight encrypt function
* New structure for storing 3des key added
* Reseting of 3des_key added
* des_context init/deinit added to poller
* New poller step for ultralight c auth added
* Added ultralight c des key to application
* Renamed felica unlock scenes to more generic des auth scenes, because they are now used also for ultralight c
* Show different menus for different ultralight card types
* Update api_symbols.csv and api_symbols.csv
* Some macro defines added
* Different amount of pages will be now read for ultralight C and others
* New unit test for ultralight C
* Some comments and macro replacements
* New function added to api
* Now all data read checks mfulC separately
* Adjusted listener to handle missing 3des_key properly
* Now poller populates 3des_key after reading with auth to card data
* Nfc: rename _3des_key to tdes_key
* Bump API Symbols
* Mute PVS Warnings

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-07-03 12:38:30 +01:00
MX
3dfd907245
Merge remote-tracking branch 'OFW/dev' into dev 2024-07-02 16:25:34 +03:00
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
MX
0812cd30b2
Merge remote-tracking branch 'OFW/dev' into dev 2024-07-01 22:18:36 +03:00
hedger
fcbcb6b5a8
Updater: resource compression (#3716)
* toolbox: compress: moved decompressor implementation to separate func
* toolbox: compress: callback-based api; cli: storage unpack command
* toolbox: compress: separate r/w contexts for stream api
* targets: f18: sync API
* compress: naming fixes & cleanup
* toolbox: compress: using hs buffer size for stream buffers
* toolbox: tar: heatshrink stream mode
* toolbox: compress: docs & small cleanup
* toolbox: tar: header support for .hs; updater: now uses .hs for resources; .hs.tar: now rewindable
* toolbox: compress: fixed hs stream tail handling
* updater: reworked progress for resources cleanup; rebalanced stage weights
* updater: single-pass decompression; scripts: print resources compression ratio
* updater: fixed warnings
* toolbox: tar: doxygen
* docs: update
* docs: info or tarhs format; scripts: added standalone compression/decompression tool for heatshrink-formatted streams
* scripts: tarhs: fixed parameter handling
* cli: storage extract command; toolbox: tar: guess type based on extension
* unit_tests: added test for streamed raw hs decompressor `compress_decode_streamed`
* unit_tests: compress: added extraction test for .tar.hs
* rpc: autodetect compressed archives
* scripts: minor cleanup of common parts
* scripts: update: now using in-memory intermediate tar stream
* scripts: added hs.py wrapper for heatshrink-related ops (single object and directory-as-tar compression)
* scripts: naming fixes
* Toolbox: export compress_config_heatshrink_default as const symbol
* Toolbox: fix various types naming
* Toolbox: more of types naming fixes
* Toolbox: use size_t in compress io callbacks and structures
* UnitTests: update to match new compress API
* Toolbox: proper path_extract_extension usage

Co-authored-by: あく <alleteam@gmail.com>
2024-06-30 11:38:48 +01:00
MX
e6c240d363
Merge remote-tracking branch 'OFW/dev' into dev 2024-06-14 17:43:34 +03:00
WillyJL
12c1d10246
Furi: Fix EventLoop state persisting on same thread after free (#3711)
* Furi: Fix EventLoop state persisting on same thread after free
* Furi: clear event loop notification state and value on allocation, report unprocessed events on free
* UnitTests: add multiple event loop runs in one thread test

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-06-14 15:00:34 +01:00
MX
181c59b30f
Merge remote-tracking branch 'OFW/dev' into dev 2024-06-10 22:55:02 +03: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
あく
0bc400a3ae
Code Cleanup: unused includes, useless checks, unused variables, etc... (#3696)
* Remove unnecessary checks
* Sublime: never insert missing headers
* Cleanup furi defines use
* Cleanup startup. Cleanup linker scripts. Explicitly define all interrupts hadlers, including uninmplemented one.
* Startup routine in C
* Drop assembler startup
* Move linker defines to stm32wb55_linker.h, cleanup naming, unify usage. Mpu: protect last 32b of main stack. Document various obscure things.
* Move furi_hal_switch documentation to appropriate place, use 0x0 for updater jump.
* UnitTests: move all temporary test files into tmp folder

---------

Co-authored-by: SG <who.just.the.doctor@gmail.com>
2024-06-11 03:04:29 +10:00
MX
7f05a224be
Merge remote-tracking branch 'OFW/dev' into dev 2024-06-09 16:05:06 +03:00
RebornedBrain
467e973da2
[FL-3810] Felica emulation (#3673)
* Moved some structs and defs from poller to generic felica
* Buffer size increased for transferring more data
* Felica HAL Tx function implemented
* Some structs and fields for listener
* Raw listener implementation
* Added new event for felica activation
* Proper config fot listener added
* Moved some structs from poller in order to use them in listener too
* New function for calculating MAC
* Listener data structures and function definitions
* Private listener functions implementation added
* Raw felica listener logic implementation added
* Fix total sector count both for poller and listener
* Defined type for write handlers
* New logic for write operations added
* Removed old commented code
* Splitted read logic into several separate functions
* New type added and some fields to instance
* New logic of read command implemented
* Defines added for response codes
* Functions moved to private namespace
* Function visibility changed and some cleanups
* Update felica_listener.c, felica_listener_i.c, and felica_listener_i.h
* Some type adjustments
* Moved frame_exchange function to private namespace
* Error handling added
* Function to get data_ptr for write request added
* Missing declaration added
* Add processing of nfc errors
* write_with_mac is a local variable now
* Adjustments to MAC calculation logic
* Values replaced with defines
* Update nfc_transport.c with felica logic
* Sync felica poller added for unit tests
* Felica unit_tests and data dump added
* Fixed proper reading of MAC_A block when it is 1st
* Macro definitions for MC added
* Function simplified
* More defines
* CRC check for incomming packets added
* Readonly logic adjusted
* Block write validation adjusted
* New logic for ID block writing
* Some cleanups
* New logic of moving across the block list with different element length
* Some cleanups
* Adjusted requires_mac logic to cover all blocks needed
* Cleanups and renaming
* New block list validation logic
* Block list logic iteration simplified
* Some asserts and checks added
* Replaced MC[2] checks with macros
* Marked def values as unsigned
* Removed old code
* Removed commented function declarations
* Changed protected block in felica test card dump and adjusted tests
* Fixes after merge
* Moved defines to header
* Now we allocate memory for max possible response pack in any case
* Some renaming and documentation
* Bump api symbols
* Set feature to emulate full for felica
* Removed 'More' button and added MoreInfo feature which adds this button back
* Types renamed
* Removed unnecessary code
* Reformat comments
* Fixing missing signatures
* Replaced crash with error log and return value
* Format doxygen comments

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-06-08 15:24:51 +01:00
MX
62ab6b7026
cleanup 2024-06-06 02:10:23 +03:00
MX
8938cbfc6e
add subghz protocol - legrand
by user890104

https://github.com/Next-Flip/Momentum-Firmware/pull/120/files
2024-06-06 01:33:47 +03:00
MX
17dbb4105d
Merge remote-tracking branch 'OFW/dev' into dev 2024-06-06 00:35:40 +03:00
Georgii Surkov
20c4121f25
[FL-3832] Use static synchronisation primitives (#3679)
* Use static mutex
* Add static_assert checks
* Use static semaphore
* Fix formatting
* Use static stream buffer
* Use static timer
* Use static event group
* Increase allocation size for stream buffer
* Remove recursive bit from the mutex before freeing
* Prevent service tasks from ever returning
* Use static threads
* Do not realloc memory when changing stack size
* Use FuriSemaphore instead of raw FreeRTOS one in rpc_test
* Remove redundant includes
* Abolish FreeRTOS dynamic allocation
* Improve FuriMutex
* Improve FuriMessageQueue
* Remove redundant comments and parentheses
* Clean up code more
* Create service threads via a dedicated constructor
* Minor code improvements
* Update docs for FuriThread, FuriTimer
* Fix doxygen typo
* Use a bigger buffer for static StreamBuffer
* Furi: remove timer control block only when timer thread have completed all operations
---------

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-06-05 18:04:03 +01:00
hedger
03196fa110
cleanup of various warnings from clangd (#3682)
* cleanup of various warnings from clangs
* lfrfid_debug: cast fixes
* subghz: binraw: round->roundf
* furi: thread: updated internal stack size variable to size_t
* github: fail faster on unsuccessful build
* unit_tests: double trouble
2024-06-03 14:43:23 +01:00
MX
303313669a
Merge remote-tracking branch 'OFW/dev' into dev 2024-06-01 22:17:17 +03:00
Filipe Paz Rodrigues
0d4ead8fbd
Add initial ISO7816 support (#3681)
* Add initial ISO7816 support
* Format sources and sync API Symbols version
* Debug: change VID/PID in ccid test app to opensc detectable generic one

Co-authored-by: あく <alleteam@gmail.com>
2024-06-01 17:45:27 +01:00
MX
64799b7b10
Merge remote-tracking branch 'OFW/dev' into dev 2024-05-31 12:29:42 +03:00
あく
3f04d6dd46
Furi: wrap message queue in container, prepare it for epoll. Accessor: disable expansion service on start. (#3672)
* Furi: wrap message queue in container, prepare it for epoll. Accessor: disable expansion service on start.
* Furi: one allocation, smaller message queue struct, type compatibility with FreeRTOS.
2024-05-30 12:58:03 +01:00
MX
8a58fc1ca7
Merge remote-tracking branch 'OFW/dev' into dev 2024-05-23 00:33:57 +03:00
gornekich
11070c9e5e
Text Box: fix displaying text with end text focus (#3658)
* text box: fix reset text offset state after initial text iteration
* debug: add tests for text box view debug app
* hal: flash: removed redundant #else

Co-authored-by: hedger <hedger@nanode.su>
2024-05-22 18:14:33 +01:00
MX
6a91588f52
Merge remote-tracking branch 'OFW/dev' into dev 2024-05-21 01:34:05 +03:00
hedger
9e42e00ead
Icons: compression fixes & larger dimension support (#3564)
* toolbox, gui: fixes for compressed icon handling
* ufbt: fixes for generated vscode project
* scripts: increased max dimensions for image converter
* icon type changes
* linter fixes; api sync
* gui: docs fix
* toolbox: fixed potential decoder buffer overflow
* minor cleanup
* fbt: sdk: suppressed deprecation warnings in API table
* toolbox: compress: added unit tests
   vscode: now installs resources for unit_tests
   unit_tests: now loads subghz region data
* toolbox: compress: review fixes, pt 1
* compress: now passes decoder buffer size as constructor argument; auto-resize decoder buffer; crash on failed icon decompression
* PVS fixes
* pvs fixes, pt2
* doxygen fixes
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* UnitTests: move all tests into plugins, brakes testing
* UnitTests: add plugin API and update plugin entrypoints
* UniTests: Test runner that works with plugins
* fbt: extra filtering for extapps to include in build
* UnitTests: filter tests by name
* loader: restored API table for unit_test build config
* Add various missing symbols to API table
* UnitTest: fail on plugin load error
* UnitTests: cleanup plugin api and reporting
* unit_tests: composite resolver
* UnitTests: remove unused declaration
* unit_tests, nfc: moved mock nfc implementation to libnfc
* unit_tests: api: removed redundant #define
* toolbox: compress: removed size_hint for icons; triggering furi_check on oversized icons
* gui: icon, icon_animation: removed size hit APIs
* Format Sources. Cleanup code.
* loader: refuse to start .fal as app
* toolbox: compress: fixed memory corruption in operations with small destination buffer; added unit tests for that case
* unit_tests: proper test skipping; better selective test interface
* unit_tests: moved 'loading' logging to proper location

Co-authored-by: あく <alleteam@gmail.com>
2024-05-20 18:23:47 +01:00
gornekich
d5339f8270
[FL-3816] Text Box rework (#3642)
* text box: rework text box to use less memory
* text box: optimize lines iteration
* text box: fix back scrolling
* text box: add end focus support
* text box: allocate index buffer on stack instead of heap
* text box: fix index decrement
* apps: add text box debug app
* debug: rework text box view app with view stack
* debug app: rename text_box_test app to text_box_element_test
* text box: rework text box module
* debug: update text box view test
* text box: fix end focus initial offset
* debug: fix memory leak in text box view test app

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-05-20 16:13:20 +01:00