Commit graph

57 commits

Author SHA1 Message Date
あく
70f93a48f5
[FL-2969] FuriHal: add ADC API (#3583)
* Examples: remove unused context
* FuriHal: add simple ADC API
* Examples: add ADC example app
* FuriHal: add extended configuration options for ADC API
* FuriHal: add ADC clock configuration, fix calibration routine for single ended mode, new optimized parameters, documentation.
* FuriHal: add FuriHalAdcChannelTEMPSENSOR sampling time note
* FuriHal: update FuriHalAdcChannelVBAT description.
* FuriHal: use insomnia while ADC is acquired.
* Examples: cleanup example_adc a little bit
2024-04-18 00:17:40 +09:00
gornekich
1a40fae003
[FL-3750] Mf Desfire multiple file rights support (#3576)
* mf desfire: remove unused type
* mf desfire: continue reading after failed get free mem cmd
* mf desfire: fix processing read master key settings command
* mf desfire: don't read applications if they are auth protected
* mf desfire: handle multiple rights
* mf desfire: fix PVS warnings
* mf desfire: fix print format
* mf desfire: fix logs
* mf classic: add send frame functions to poller
* unit tests: add test from mfc crypto frame exchange
* mf classic: add documentation
* mf classic: fix incorrect name
* target: fix api version
2024-04-16 14:55:24 +09:00
RebornedBrain
fb9728d570
[FL-3772] Felica poller (#3570)
* New types for felica poller
* New functions for felica data transmissions
* Felica memory map extended with new fields
* Init/deinit of mbedtls context added for felica encryption
* Functions for session key and mac calculations added
* Raw felica_poller implementation added
* Removed MAC type parameter from check_mac function
* Replaced all data fields needed for auth with context structure
* Clean up felica_poller.c
* Now RC block is filled with random numbers
* New parameter for counting well-read blocks
* Some cleanups
* Felica file save and load logic added
* Now we use card key from context for session key calculation
* Copying card key to card block from auth context when both authentications succeeded, otherwise decrement blocks count by 1
* New felica poller event added
* Moved some data structions to public namespace
* FelicaAuthenticationContext struct moved to felica.h
* Field type and name changed for better ones
* Helper functions for felica_auth added to the app
* New scene for felica card key input added
* Logic for felica key input added
* Auth context request processing added
* Added block index definitions and replaced all index numbers with them
* More macro defines
* Replace nesting with do while block
* New function for write operations mac calculation added
* Replace nesting with do while block
* Make functions static for now because they are used internally
* Wrote some comments
* Raw felica render implementation
* New felica scenes
* Adjusted felica dump rendering according design requirements
* New felica scene added
* Helper for switching scene during unlock added
* Added warning scene and transfer to it
* Moved unlock scene logic to separate files
* Magic number changed
* New felica render logic
* Felica scenes adjusted according to design requirements
* Felica poller cleanups
* Some asserts added and some fixed
* Replcaed asserts to checks in public api
* Fixed pvs warnings in felica_poller
* New event for felica_poller added for incomplete read actions
* Handling of new poller event added
* Update SConscript with felica files
* Update api_symbols.csv with felica functions
* Sync API versions

Co-authored-by: あく <alleteam@gmail.com>
2024-04-10 18:51:36 +09:00
WillyJL
e3ca293eee
Desktop/Loader: Unload animations before loading FAPs (#3573)
* Desktop: Unload animations before FAP is loaded
* Loader: Add API to start detached (returns instantly, queues event)
* Desktop: Fix early animation unload deadlocks
* Loader: remove redundant event
* Bump api symbols

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
2024-04-09 22:42:03 +09:00
あく
88a6860913
Update radio stack to v1.19.0 (#3545)
* Update radio stack to v1.19.0
* Ble: set max connection interal same as min, kinda speedups everything
2024-04-09 16:01:55 +09:00
Astra
27e61eb808
Move crypto1 to helpers, add it to the public API (#3567)
* Move crypto1 to helpers, add it to the public API
* F18 API version bump

Co-authored-by: あく <alleteam@gmail.com>
2024-04-07 23:47:48 +09:00
WillyJL
c31b60c7b7
IR: Fix crash on duty_cycle=1 (#3568)
* IR: Fix crash on duty_cycle=1
* Infrared: use float around duty_cycle

Co-authored-by: あく <alleteam@gmail.com>
2024-04-07 22:21:25 +09:00
hedger
096a26b07d
fbt: added -Wstrict-prototypes for main firmware (#3557)
* fbt: added -Wstrict-prototypes for main firmware (excludes extapps)
* unit_tests: fixed declarations using strict prototypes
* furi_hal: ble: changed gap stop log level to debug

Co-authored-by: あく <alleteam@gmail.com>
2024-04-02 02:02:45 +09:00
Georgii Surkov
64bd2f9c84
[FL-3677, FL-3798] RFID Improvements (#3524)
* Update saved_info and read_success scenes
* Update EM4100 rendering
* Update HIDExt rendering
* Update Gallagher rendering
* Update HidProx rendering
* Update IOProx rendering
* Update H10301 rendering
* Update PAC/Stanley rendering
* Add strcasecmp() to API, better manufacturer/name handling
* Update Viking rendering
* Update FDX-A rendering
* Update Pyramid rendering
* Update Indala26 rendering
* Update Idteck rendering
* Update Keri rendering
* Update Nexwatch rendering
* Update Jablotron rendering
* Update Paradox rendering
* Truncate long Hex string on scene_read_suceess
* Fix formatting
* Update AWID rendering
* Update FDX-B rendering
* Tweak string formatting in various screens
* More read_success view tweaks
* Fix formatting
* Fix Pyramid brief rendering
* Reset saved key menu when going back
* Reset other menus on back where applicable
* Update confirmation scenes
* Update emulation scene
* Update delete scene
* Update raw read info screen
* Update raw read scene, fix crash
* Update raw read success scene
* Update write scene
* Always return to SceneSelectKey after saving
* Update SceneWriteSuccess and SceneDeleteSuccess
* Replace closing parens with dots
* FL-3798: Fix special formatting in text_box
* Simplify SceneReadSuccess
* Fix crash when having a trailing newline in text_box
* Bump API symbols version
* Make PVS happy
* Format sources

Co-authored-by: あく <alleteam@gmail.com>
2024-03-29 12:32:43 +09:00
Silent
8ec1c74baf
SavedStruct: Introduce saved_struct_get_metadata (#3392)
* SavedStruct: Replace saved_struct_get_payload_size with saved_struct_get_metadata
  This new function can obtain the magic value, version and payload size
  all at once. This makes the function useful e.g.
  for backwards compatibility.
* SavedStruct: const-qualify saved_struct_save
* Toolbox: add saved struct documentation

Co-authored-by: あく <alleteam@gmail.com>
2024-03-26 03:48:18 +09:00
Georgii Surkov
adafe96924
[FL-3762] Configurable Infrared TX output (#3484)
* Implement Gui for the feature
* Implement furi_hal side
* Implement IR module detection
* Fix PVS warnings
* Add comments

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-03-25 17:56:56 +09:00
Nikolay Minaylov
6de2934394
BadUSB: BLE, media keys, Fn/Globe key commands (#3403)
* BadUSB: media keys, GLOBE command
* f18 api table fix
* BadUSB over BLE
* Made PVS happy

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-03-25 17:39:33 +09:00
gornekich
f633f476c8
[FL-3787] NFC: Slix privacy password reveal and Desfire detect fix (#3504)
* slix: fix incorrect default privacy passwords
* slix poller: add check privacy password state
* mf desfire: change detect algorithm
* mf desfire: change detection algorithm to check master key version
* mf desfire: change assert to check
* Update api symbols and cleanup code

Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 16:18:28 +09:00
WillyJL
0a48658a9a
GUI: Fix elements module for new canvas API (#3527)
* GUI: Fix elements module for new canvas API
* Update symbols
* Update f18 symbols
* Gui: update elements for new canvas

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-03-23 14:54:01 +09:00
hedger
6947d3dea2
BLE/GAP fixes (#3533)
* hal: fixed ble_gap race on queue init
* fbt: removed deprecated path_as_posix
* hal: fixed inconsistencies between f7/f18 APIs
* hal: fixed excessively strict event handler re-init checks

Co-authored-by: あく <alleteam@gmail.com>
2024-03-22 21:36:05 +09:00
あく
bcde0aefbd
[FL-3729] Gui: unicode support, new canvas API (#3322)
* Revert "Rollback #3305 and #3297 fix various rendering issues (#3307)"

This reverts commit 531ba24e9a.

* Gui: refactor canvas to use proper coordinate system types. Furi: new furi_break check macros. Desktop: proper types for negative offset.

* Desktop: proper types in desktop_view_locked_doors_draw

* Examples: update images example, off it goes

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-03-19 19:23:06 +04: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
Astra
ecab4d53d2
[FL-870] Auto-generated firmware documentation take two (#2944)
* Add doxygen and doxygen-awesome css, cleanup docs files
* Ignore more libraries and remove leftover local variables
* Create an actual intro page
* .md files linting
* Add doxygen action
* Fix Doxygen path
* Fix doxyfile path
* Try to upload
* Change docs branch
* Add submudules checkout
* Disable doxygen on PR
* Mention the firmware docs in the readme
* More dev docs mentions in the readme
* Fix runner group, add tags
* Test dev in PR
* Disable running on PR
* Fix a typo in the doxyfile
* Try upload to S3
* Fix local path
* Fix S3 ACL
* Add delete flag, unifying dev and tags
* Update ignored directories
* More ignored directories
* Even more ignored directories
* Fix submodule
* Change S3 uploader
* Change S3 uploader version
* Fix aws sync flags
* Fix ACL
* Disable ACL
* Improve ignores, add WiFi devboard docs
* TEMP: generate dev docs
* TEMP: generate 0.89.0 docs
* Disabling PR trigger
* Enable submodules and test build
* Enable test build
* Disable test build
* Change docs directory structure
* Fix accidentally committed submodule
* Fix submodules
* Update links to the developer documentation
* Markdown linting
* Update workflow, enable test build
* Fix doxygen dir path
* Update Doxyfile-awesome.cfg
* Change paths
* Fix upload docs path
* Disable pull_request debug trigger
* Disable tags building
* Remove autolinks and namespaces
* Establish basic documentation structure
* Add missing changes
* Improve stylesheet, move some files
* Improve examples
* Improve the main page
* Improve application dev docs
* Improve system programming docs
* Improve development tools docs
* Improve other docs
* Improve application examples
* Fix formatting
* Fix PVS-studio warnings
* Improve visuals
* Fix doxygen syntax warnings
* Fix broken links
* Update doxygen action

Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2024-03-06 15:25:21 +09:00
hedger
bc309cebe6
Toolchain fixes (#3451)
toolchain: updated to v33 with debugging & other fixes
toolchain: better error handling during update/env configuration process
debugging: improved udev rules file, added readme on installation
firmware: bumped compiler C/C++ standards (stricter code checks)
firmware: fixed warnings emerging from newer standards
ufbt: FBT_NOENV is now also supported by ufbt
fbt: added ccache-related variables to env forward list on Windows
2024-02-26 16:16:19 +04:00
hedger
60a9d7e6cf
ble: profile rework (#3272)
* ble: profile rework, initial
* apps: hid: fix for pairing cleanup
* app: hid: select transport based on #define
* fixing PVS warnings
* ble: serial service: fixed uid naming
* bt service: on-demand dialog init; ble profiles: docs; battery svc: proper update
* Added shci_cmd_resp_wait/shci_cmd_resp_release impl with semaphore
* app: hid: separated transport code
* ble: fixed service init order for serial svc; moved hardfault check to ble_glue
* cli: ps: added thread prio to output, fixed heap display
* ble_glue: naming changes; separate thread for event processing;
* furi: added runtime stats; cli: added cpu% to `ps`
* cli: fixed thread time calculation
* furi: added getter for thread priority
* fixing pvs warnings
* hid profile: fixed naming
* more naming fixes
* hal: ble init small cleanup
* cleanup & draft beacon api
* f18: api sync
* apps: moved example_custom_font from debug to examples
* BLE extra beacon demo app
* naming fix
* UI fixes for demo app (wip)
* desktop, ble svc: added statusbar icon for beacon
* minor cleanup
* Minor cleanup & naming fixes
* api sync
* Removed stale header
* hal: added FURI_BLE_EXTRA_LOG for extra logging; comments & code cleanup
* naming & macro fixes
* quick fixes from review
* Eliminated stock svc_ctl
* cli: ps: removed runtime stats
* minor include fixes
* (void)
* naming fixes
* More naming fixes
* fbt: always build all libs
* fbt: explicitly globbing libs; dist: logging SDK path
* scripts: fixed lib path precedence
* hal: bt: profiles: naming changes, support for passing params to a profile; include cleanup
* ble: hid: added parameter processing for profile template
* api sync
* BLE HID: long name trim
* Removed unused check
* desktop: updated beacon status icon; ble: hid: cleaner device name management
* desktop: updated status icon

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: nminaylov <nm29719@gmail.com>
2024-02-16 14:20:45 +07:00
Leptopt1los
26ac455fb9
T5577 lib: write with mask function added (#3362)
* T5577 lib: write with mask function added
* t5577_write_with_mask: with_password param added

Co-authored-by: あく <alleteam@gmail.com>
2024-02-15 13:10:48 +07:00
Leptopt1los
feb45f6645
FuriHalRtc refactor: new datetime lib (#3386)
* datetimelib created
* datetimelib unit tests added
* firmware fixes to new datetimelib
* typo fix
* merge artifacts fixed, datetimelib renamed to datetime

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-15 10:44:41 +07:00
Leptopt1los
dd988ba449
bit_lib and nfc_util refactor (#3383)
* nfc_util functions for processing bytes moved into bit_lib
* bitlib test update
* bit_lib moved from lfrfid to standalone lib
* Added bit functions for any supported data types
* Error fix and api add
* Added test for 64
* Added doc
* Testcase for 64 rewrited
* Realization error fix
* API version bump
* sync api version, fix after-merge old libs usage
* fix build errors
* build fix
* fbt format

Co-authored-by: assasinfil <nfa57643@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-02-14 11:41:42 +07:00
gornekich
3d9a6a41db
FIX ISO15693 emulation (#3444)
* furi hal gpio: allow enabling interrupt without handler
* signal reader: explicitly enable and disable gpio interrupt

Co-authored-by: あく <alleteam@gmail.com>
2024-02-14 09:37:04 +07:00
Nikolay Minaylov
0154018363
[FL-3579, FL-3601, FL-3714] JavaScript runner (#3286)
* FBT: cdefines to env, libs order
* API: strtod, modf, itoa, calloc
* Apps: elk js
* Apps: mjs
* JS: scripts as assets
* mjs: composite resolver
* mjs: stack trace
* ELK JS example removed
* MJS thread, MJS lib modified to support script interruption
* JS console UI
* Module system, BadUSB bindings rework
* JS notifications, simple dialog, BadUSB demo
* Custom dialogs, dialog demo
* MJS as system library, some dirty hacks to make it compile
* Plugin-based js modules
* js_uart(BadUART) module
* js_uart: support for byte array arguments
* Script icon and various fixes
* File browser: multiple extensions filter, running js scripts from app loader
* Running js scripts from archive browser
* JS Runner as system app
* Example scripts moved to /ext/apps/Scripts
* JS bytecode listing generation
* MJS builtin printf cleanup
* JS examples cleanup
* mbedtls version fix
* Unused lib cleanup
* Making PVS happy & TODOs cleanup
* TODOs cleanup #2
* MJS: initial typed arrays support
* JS: fix mem leak in uart destructor

Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-12 15:54:32 +07:00
Georgii Surkov
6836a7b7c5
[FL-3764] Expansion module service improvements (#3429)
* Separate expansion control and worker threads
* Add edge case checks
* Reduce expansion control thread stack size, add comments
* Fix crash when disabling expansion modules
* Show a different RPC icon for expansion modules
* Restore expansion interrupt on changing logging settings
* Improve responsiveness in heavy games at the expense of dropped frames
* Improve furi_hal_serial API
* Fix a typo
* Remove too optimistic furi_check, replace with condition
* Fix premature RX interrupt during serial configuration
* Disable expansion interrupt if the handle was acquired
* Do not use a timer callback

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-12 09:16:34 +07:00
hedger
14dabf523a
New toolchain with gcc 12 (#3254)
* changes for xPack 12.3
* support for gcc 13.2
* Update tools name
* Add new linux toolchain
* Fixed copro submodule
* Fix gdb-py
* Fixes for c++ apps
* Fix gdb-py3, add udev rules
* Fixed udev rules location
* Add MacOS arm, fix fbt toolchain download
* Fixed downloading error file
* fbt: fixed linker warnings; removed gcc 10 from list of supported toolchains
* ufbt: fixed supported toolchain versions
* nfc: replaced local malloc with calloc
* restored code with Warray-bounds to older state
* Update fbtenv.cmd
* Suppressing warnings
* Bump to 25
* Bump to 26
* lint: reformatted macros for new clang-format
* Bump to 27
* Fix m type word
* Bump to 28
* furi: added FURI_DEPRECATED macro
* scripts: toolchain download on Windows: fixing partially extracted cases

Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com>
2024-02-12 09:04:12 +07:00
Nikolay Minaylov
b2a7bb0696
[FL-3672] CLI: cat command crash workaround (#3358)
* Cli input len limit, CDC EP type fix

Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 15:59:24 +07:00
あく
afd41aade1
FuriHal: various GPIO improvements (#3406) 2024-02-07 12:09:29 +03:00
Georgii Surkov
e6f078eeb7
[FL-3759] Fix expansion protocol crash when fed lots of garbage (#3409)
* Fix crash caused by garbage input
* Add unit tests for garbage input
* Enable applications to disable and then restore expansion module support
* GPIO App: disable expansion on app start and re-enable on exit

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-01-30 22:54:25 +09:00
あく
c8ea167a06
0.98.0-rc various fixes (#3402) 2024-01-29 21:35:46 +09:00
Georgii Surkov
95737958ad
[FL-3669] Expansion module protocol (#3250)
* ApiSymbols: add furi_record_destroy
* FuriHal: cleanup serial API, add logging configuration in RTC
* FuriHal: hide private part in _i header. Toolbox: cleanup value index. SystemSettings: logging device and baudrate.
* FuriHal: RTC logging method documentation
* Synchronize API Symbols
* Furi: mark HEAP_PRINT_DEBUG as broken
* FuriHal: furi_hal_serial, add custom IRQ func
* Fix PR review issues
* Implement basic external module detection and echo
* Update api symbols for f18
* Minimally working implementation (can create directory via rpc)
* Make expansion protocol parser a header-only library
* Rename a function
* Improve thread syncronisation
* Implement multi-packet transmissions
* Improve test application
* Clean up expansion worker code
* Send heartbeat when host is ready
* Update API symbols
* Add draft documentation
* Expansion worker: proper timeout and error handling
* Expansion worker: correct TX, do not disable expansion callback
* Expansion protocol: pc side test script
* PC side expansion test: trying to change baudrate
* Working comms between 2 flippers
* Cleaner exit from expansion worker thread
* Better checks
* Add debug logs
* Remove unneeded delays
* Use USART as default expansion port
* Refactor furi_hal_serial_control, fix crash
* Improve furi_hal abstraction, wait for stable rx pin
* Remove rogue include
* Set proper exit reason on RPC error
* Remove rogue comment
* Remove RX stability check as potentially problematic
* Improve expansion_test application
* Remove rogue define
* Give up on TODO
* Implement expansion protocol checksum support
* Update ExpansionModules.md
* RPC: reverse input
* Assets: sync protobuf
* Fix typos
* FuriHal: UART add reception DMA (#3220)
* FuriHal: add DMA serial rx mode
* usb_uart_bridge: switch to working with DMA
* Sync api symbol versions
* FuriHal: update serial docs and api
* FuriHal: Selial added similar API for simple reception mode as with DMA
* FuriHal: Update API target H18
* API: ver API H7
* FuriHal: Serial error processing
* FuriHal: fix furi_hal_serial set baudrate
* Sync api symbols
* FuriHal: cleanup serial isr and various flag handling procedures
* FuriHal: cleanup and simplify serial API
* Debug: update UART Echo serial related flags
* FuriHal: update serial API symbols naming
* Make expansion_test compile
* Remove unneeded file
* Make PVS-studio happy
* Optimise stack usage
* Optimise heap usage, improve api signature
* Fix typo
* Clean up code
* Update expansion_protocol.h
* Fix unit tests
* Add doxygen comments to expansion.h
* Update/add doxygen comments
* Update ExpansionModules.md
* Github: new global code owner
* FuriHal: naming in serial control
* Expansion: check mutex acquire return result

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SkorP <skorpionm@yandex.ru>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: Skorpionm <85568270+Skorpionm@users.noreply.github.com>
2024-01-16 18:18:56 +09:00
あく
dd182ab179
FuriHal: interrupt priorities and documentation (#3366)
* FuriHal: interrupt priorities and documentation
* FuriHal: wording
* FuriHal: update interrupt docs
* FuriHal: add more interrupt priority levels
* FuriHal: proper furi_check in interrupts, shift default level to 10

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-01-16 03:17:07 +04:00
あく
fc043da9c6
FuriHal: UART refactoring (#3211)
* FuriHal: UART refactoring
* ApiSymbols: add furi_record_destroy
* FuriHal: cleanup serial API, add logging configuration in RTC
* FuriHal: hide private part in _i header. Toolbox: cleanup value index. SystemSettings: logging device and baudrate.
* FuriHal: RTC logging method documentation
* Synchronize API Symbols
* Furi: mark HEAP_PRINT_DEBUG as broken
* FuriHal: furi_hal_serial, add custom IRQ func
* Fix PR review issues
* FuriHal: UART add reception DMA (#3220)
* FuriHal: add DMA serial rx mode
* usb_uart_bridge: switch to working with DMA
* Sync api symbol versions
* FuriHal: update serial docs and api
* FuriHal: Selial added similar API for simple reception mode as with DMA
* FuriHal: Update API target H18
* API: ver API H7
* FuriHal: Serial error processing
* FuriHal: fix furi_hal_serial set baudrate
* Sync api symbols
* FuriHal: cleanup serial isr and various flag handling procedures
* FuriHal: cleanup and simplify serial API
* Debug: update UART Echo serial related flags
* FuriHal: update serial API symbols naming
* FuriHalSerial: various improvements and PR review fixes
* FuriHal: proper ISR function signatures

---------

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SkorP <skorpionm@yandex.ru>
Co-authored-by: Skorpionm <85568270+Skorpionm@users.noreply.github.com>
2024-01-16 03:09:37 +04:00
Skorpionm
d73d007797
SubGhz: add subghz tx_from_file CLI cmd, major TX flow refactoring, various improvements and bug fixes (#3302)
* SubGhz: add cmd CLI "subghz tx_from_file"
* SubGhz:  add sending raw.sub files
* SubGhz: add load custom preset
* SubGhz: remove unnecessary files
* SubGhz: change message
* SubGhz: fix printf formatting
* SubGhz: Cli refactoring code
* FuriHal: add furi_hal_subghz Tx Rx IDLE state switching test
* SubGhz: remove debug code, fix ext driver compilation
* SubGhz: cleanup code, move wait status routine to cc1101 driver
* SubGhz: proper pin mode transition in tx stop isr routine, proper DMA and ISR priorities, fix issue with async tx stuck
* SubGhz: simplify async tx stop flow, fix ISR ARR check condition race
* SubGhz: check ARR only when we transmitting
* SubGhz: check ARR only when we transmitting for ext cc1101
* SubGhz: lower ISR priorities to safe level
* SubGhz: proper gpio config, comments update

Co-authored-by: あく <alleteam@gmail.com>
2024-01-15 14:38:43 +09:00
Leptopt1los
3fd5f15e7f
Furi_hal_rtc: new function (#3294)
* furi_hal_rtc_timestamp_to_datetime added
* hw targets api version sync
* hw targets api version sync, bump
* FuriHal: update rtc docs
* unit tests added

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-01-14 17:07:42 +09:00
Skorpionm
34539cda17
FuriHal: fix start duration furi_hal_subghz_async_tx (#3230)
* FuriHal: fix start duration furi_hal_subghz_async_tx
* FuriHal: add check min duration arr for the first level
* FuriHal: fix conflict dev
* SubGhz: fix unit_test
* FuriHal: subghz internal fix start/stop transmit duration
* Drivers: subghz external fix start/stop transmit duration
* FuriHal: subghz optimization
* SubGhz: fix unit_test subghz
* FuriHal: subghz fix end duration if size == size dma buf
* FuriHal: revert enum values order, remove garbage
* FuriHal: revert one more small bit in subghz
* FuriHal: handle various corner cases in subghz transmission
* FuriHal: cleanup subghz code
* FuriHal: add parenthesis around value in subghz defines
* FuriHal: add packer subghz_async_tx
* FuriHal: more reliable subghz transmission end handling, fixes stuck transmission
* FuriHal: add subghz crutch docs, and rename some defines to conform naming standards
* FuriHal: subghz,  the logic of timers has been changed. disabling the shadow register ARR
* FuriHal: fix subghz off dma irq
* SubGhzExt: fun rename
* FuriHal,SubGhz: fix g0 state on reset, fix incorrect async_tx stop sequence, remove dead code.

Co-authored-by: あく <alleteam@gmail.com>
2024-01-11 16:56:14 +09:00
RebornedBrain
d511d76a1b
[FL-3678] [FL-3733] [FL-3723] UI refactor (#3323)
* Added new image DolphinSaved_113x58.png for all "saved" pages
* New image DolphinDone_80x58.png added
* Replaced dolphins on all scenes accroding to new UI specs
* New success dolphin image added
* Success scene image replaced
* Changed image and text for update initial scene
* Image and text adjusted for "Original restored" scene
* Removed old DolphinNice_96x59.png image
* New image for LFRFID scene
* Removed unused image
* New UI image added to assets
* Replaced warning dolphin on mf_classic write initial fail scene
* Removed old image
* Changed image on scenes to a new one
* New dolphin mafia image
* Replaced dolphin mafia image to a new one
* Removed DolphinMafia_115x62.png
* New check symbol on completed state for detect_reader
* Adjusted layout elements position
* Removed second switching to popup view in order to achieve control in support callbacks
In general now we show generic scene and after that in on_enter callback we can redefine it for particular protocol
* CardDetected event now also triggers on_event callback
* Now on AuthRequest we throw CardDetected custom event
* Added callback for read_on_event
* Now we show different screen while reading and unlocking
* Fixed missing asstes for some scenes
* Update DolphinMafia_119x62.png
* Adjusted all the scenes with DolphinMafia image
* Scenes with save image adjusted
* Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_113x58.png
* All common dolphins moved to Dolphin folder
* Moved DolphinReadingSuccess_59x63.png to Dolphin folder
* Set proper led color for detect and read scenes
* Added new notification sequence for semi_success results
* Use new sequence for semi_success nfc reads
* Different events are now throwed depending on read result
* Added handling of incomplete event for ultralight cards
* Replaced image for iButton scene
* Updated API for f18
* Fixed issue with unlock retry sequence
* Fix after review
* Success notification replaced to semi success in case of incomplete mf classic reading
* New text for read scene
* New read result sound notification logic for mf classic cards

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-02 15:43:46 +09:00
あく
c9e3f20314
[FL-3429] About: cn,tw,mx certification information (#3318) 2023-12-26 15:12:17 +09:00
Andrea Maugeri
7642d67cae
NfcDict Refactoring (#3271)
* toolbox(keys_dict): generalize nfc_dict
* nfc: rework nfc app and tests
* toolbox(keys_dict): improve code readability
2023-12-18 14:30:56 +00:00
Leptopt1los
36aecfbec9
nfc_util: little endian bytes2num functions added (#3287)
* nfc_util_bytes2num_little_endian function added
* f18 target api version sync
* Bump api version

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-12-15 17:05:16 +00:00
あく
90cb1c4f2e
FuriHal: RTC register reset API. New factory reset routine that wipes all RTC backup registers content. (#3288) 2023-12-12 19:12:57 +04:00
あく
e2e3663524
FuriHal: various GPIO improvements (#3260)
* FuriHal: add alternative gpio pulls that covers special cases, extra checks and crash on inalid parameters.
* FuriHal: optimize pwr_XX selection in gpio_init
* FuriHal: cleanup gpio param validation crash routine
2023-12-12 14:39:14 +00:00
Augusto Zanellato
b51a754fd9
Mifare Classic nested auth support (#3238)
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 22:25:53 +09:00
Augusto Zanellato
c1e0d02afc
ST25TB poller refining + write support (#3239)
* nfc: st25tb: rework async poller
* nfc: st25tb: introduce sync poller
* nfc: st25tb: add write support
* nfc: st25tb: rewrite poller to use better states
* nfc: st25tb: move to mode request state after success
* nfc: st25tb: minor bug fixes
* type wasn't properly set on ready event
* sending NfcCustomEventPollerFailure on St25tbPollerEventTypeFailure caused poller to being freed and ultimately resulted in a thread crash

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 18:42:00 +09:00
hedger
890c9e87ce
[FL-3690] Libraries cleanup; u2f crypto rework to use mbedtls (#3234)
* examples: plugins: utilize fal_embedded
* libs: removed fnv1a_hash
* furi: added FURI_PACKED; apps, libs: changed to use FURI_PACKED
* lib: mbedtls: using custom config
* lib: toolbox: removed md5, switched to mbedtls
* targets: f18: link fix
* lib: added mbedtls_cfg.h
* apps: nfc: explicit dependency on libmbedtls
* u2f: reworking to mbedtls
* u2f: replaced sha256 & hmac with mbedtls
* u2f: functional rework using mbedtls
* libs: dropped micro-ecc
* u2f: dropped old implementation
* toolbox: removed sha256 impl
* mcheck() for mbedtls
* libs: removed libmisc; split into smaller libs
* apps: debug: fixed display_test
* apps: include cleanups
* fbt: fixed VERSIONCOMSTR
* furi: added FURI_CHECK_RETURN
* lib: removed qrcode
* cleanup
* fbt: lint_py+format_py: fixed excessive command length
* api: Removed bzero from f7
* api: Removed bzero from f18
* Bump API Symbols

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 18:16:48 +09:00
Evgeny Stepanischev
ff129e524a
Allows you to use UCS-2 in canvas_glyph_width (#3226)
* allows you to use UCS-2 in canvas_glyph_width
* Sync API Symbols

Co-authored-by: あく <alleteam@gmail.com>
2023-11-30 18:38:48 +09:00
RebornedBrain
1c3cbec661
[FL-3640] NFC: Felica UID emulation (#3190)
* Added basic template of Felica listener
* Raw nfc felica listener functions
* Added functions to setup chip for felica listener
* Cleanup function templates from unnecessary parts
* Removed todo comment
* Updated api versions
* Adjusted chip config for felica
* Set proper chip passive target mode for felica
* Added felica function to unit tests
* Update furi_hal_nfc_felica.c
* Removed duplication

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2023-11-26 17:10:33 +09:00
Sergey Gavrilov
4b3e8aba29
[FL-3664] 64k does not enough (#3216)
* Unit tests: add "exists" to furi_record tests
* Unit tests: mu_warn, storage 64k test
* Storage: read/write over 64k
* Unit tests: moar tests for storage r/w for >64k cases
* Apps, libs: replace uint16_t with size_t on storage r/w operations
* Unit tests: better data pattern, subghz: warning if transmission is prohibited

Co-authored-by: あく <alleteam@gmail.com>
2023-11-16 01:39:27 +09:00
あく
457aa5331f
Various Fixes for 0.95 (#3215)
* FuriHal: retry gauge/charger initialization
* FuriHal: lower logging level for flash known errata
* FuriHal: graceful fail if subghz chip is not working
* Furi: issue stop command even if timer is not active, document timer behavior
2023-11-15 20:11:05 +04:00