Commit graph

569 commits

Author SHA1 Message Date
hedger
ace0901125
[FL-3486,FL-3392] fbt: various improvements and bug fixes (#2982)
* fbt: extapps: compact debug format for .faps
* fbt: sdk: fixed symbol cache regen logic for removed-only symbols
* lib: elf_file: early .fap file handle release
* fbt: extapps: added FAP_VERSION define for application environments
* github: added appsymbols artifact
* api: updates for f18
* github: fixed early fap_dist
* fbt: added flash_dap
* ufbt: added flash_dap
* fbt: reworked flash target; scripts: program.py->fwflash.py and changes
* vscode: updated configuration
* scripts: fwflash.py: ugly fixes for ufbt
* scripts: fwflash.py: cleanup
* fbt: flash: always use .elf file
* scripts: fwflash: fixed elf file path

Co-authored-by: あく <alleteam@gmail.com>
2023-08-23 03:33:10 +09:00
Astra
e353433cd8
[FL-3488] Assign tickets to all TODO items (#2988)
Co-authored-by: あく <alleteam@gmail.com>
2023-08-23 02:56:27 +09:00
MMX
f75fcd4e34
UI: Clock on Desktop (#2891)
* Clock on desktop
* Gui: gui_active_view_port_count
* Gui: move gui_active_view_port_count to private header, update docs
* Desktop: simplify desktop clock code
* Desktop: refactor clock
* Desktop: optimize clock code
* Desktop: 3rd cleanup round
* Desktop: 4th cleanup round, missing bits and pieces

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-08-11 01:10:15 +09:00
あく
2702c00ba4
Scripts: OB recovery (#2964)
* Scripts: OB recovery
* Scripts: slightly different ob
* Scripts: remove excessive return
* Scripts: simplifying work with registers
* Make PVS happy

Co-authored-by: SG <who.just.the.doctor@gmail.com>
2023-08-10 19:45:17 +10:00
twisted-pear
c976ff11bf
Expose additional functions of the crypto engine to user (#2923)
* Allow loading user supplied keys and add CTR mode
* Add GCM mode to furi_hal_crypto
* Split up CTR and GCM code, add flag for adv crypto
* Add convenience functions for GCM crypto
* Run fbt format
* Update GCM to support additional auth data
* Update APIs
* FuriHal: update crypto documentation, method names and usage
* Clean up code for key (un)loading, GCM and CTR
  - get rid of goto
  - do not use furi_hal_bt_is_alive() when not using secure enclave
  - give defines a type and wrap in ()
* Add unit test for CTR and GCM crypto
* FuriHal: const in crypto unit tests, cortex timer for crypto operations timeouts
* FuriHal: update crypto docs

Co-authored-by: twisted_pear <twstd@posteo.net>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-08-10 17:44:46 +09:00
Astra
a39ef50fdb
[FL-3433] Add compressor.h to the SDK (#2962) 2023-08-09 16:52:41 +09:00
Dzhos Oleksii
68eb1ecebb
[FL-3385] New RTC flags in device info (#2884)
* Add new rtc flags to device info
* FuriHal: bump info version
* Fix local
* Rework device info by hierarchy filtering

Co-authored-by: あく <alleteam@gmail.com>
2023-08-01 17:20:30 +09:00
Nikolay Minaylov
a2a4fa8cda
[FL-3408, FL-3429, FL-3430] Backlight notification fix (#2878)
* Notifications: display brightness override fix
* FuriHalVersionColor update
* float comparison fix

Co-authored-by: あく <alleteam@gmail.com>
2023-08-01 16:56:11 +09:00
あく
76e97b8d35
[FL-3051] Gauge initialization routine refactoring, new DataMemory layout, configuration update (#2887)
* FuriHal: refactor power gauge config

* Format sources and move gauge DM load to separate method

* FuriHal: bq27220 refactoring part 1

* Power: use SYSDWN battery status flag for system shutdown

* Libs: bq27220 read DM before write, fix incorrect shift

* FuriHal: cleanup gauge config, add flags, add ptr DM type, update symbols

* FuriHal: 2 stage gauge DM verification and update, better detection routine

* FuriHal: update gauge configuration, lower sleep current and deadband

* FuriHal: gauge and charger health reporting

* Lib: cleanup bq27220 sources

* FuriHal: correct documentation for furi_hal_power_is_shutdown_requested

* FuriHal: proper gauge config for f7
2023-07-18 14:46:38 +04:00
hedger
20f6394ad8
[FL-3431] Radio headers in SDK (#2881) 2023-07-17 11:51:15 +04:00
Skorpionm
25ec09c7eb
SubGhz: fix check connect cc1101_ext (#2857)
* SubGhz: fix check connect cc1101_ext
* SubGhz: fix syntax
* SubGhz: enable interface pin pullups
* SubGhz: fix syntax
* SubGhz: fix CLI check connect CC1101_ext
* SubGhz: fix CLI display of the selected device

Co-authored-by: あく <alleteam@gmail.com>
2023-07-12 13:41:46 +04:00
Astra
8bccfd6fd8
[FL-3363] More descriptive error messages for the log command (#2835)
* More descriptive error messages for the log command
* Log level description improvements
* Log help changes

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-07-11 15:41:16 +04:00
Sergey Gavrilov
9b2d80d6b7
[FL-3400] External menu apps (#2849)
* FBT, applications: add MENUEXTERNAL app type
* FBT, uFBT: build MENUEXTERNAL as EXTERNAL app
* Loader menu: show external menu apps
* LFRFID: move to sd card
* FBT: always build External Applications list
* Archive: look for external apps path
* Infrared: move to sd card
* Apps: add "start" apps
* iButton: move to sd card
* BadUSB: move to sd card
* External apps: update icons
* GPIO: move to sd card
* Loader: look for external apps path
* U2F: move to sd
* SubGHz: move to sd
* Apps: "on_start" metapackage
* NFC: move to sd
* Sync f7 and f18

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-07-10 12:03:41 +04:00
Astra
0195f8bf00
[FL-3350] Device Info update (#2840)
* Update F18 version info
* Certification info for F18

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-07-10 10:48:00 +04:00
Skorpionm
cef59887ed
[FL-3401, FL-3402] SubGhz: add "SubGhz test" external application and the ability to work "SubGhz" as an external application (#2851)
* [FL-3401] SubGhz:  add "SubGhz test" external application
* SubGhz: delete test test functionality from SubGhz app
* [FL-3402] SubGhz: move func protocol creation API

Co-authored-by: あく <alleteam@gmail.com>
2023-07-07 00:15:03 +09:00
Sergey Gavrilov
d8500510be
API: explicitly add math.h (#2852)
* API: explicitly add math.h

* sync target api versions
2023-07-06 15:49:53 +04:00
Skorpionm
906cca8f24
Furi_Power: fix furi_hal_power_enable_otg (#2842)
* Furi_Power: fix furi_hal_power_enable_otg
* SubGhz: fix error output connected USB
* Furi_Hal: fix target F18
* Fix api_symbols.csv version for F7

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-07-06 01:48:02 +09:00
あく
f3ae09cc16
FuriHal: allow nulling null isr (#2846)
* FuriHal: allow nulling null isr
* FuriHal: include interrupt priority 15 as allowed
* Furi: prevent compiler from optimizing arg in r0 of RESTORE_REGISTERS_AND_HALT_MCU
2023-07-06 01:39:17 +09:00
あく
97fbd84e08
FuriHal, Infrared, Protobuf: various fixes and improvements (#2845)
* Infrared: fix crash caused by null-ptr dereference in interrupt call. FuriHal: callback checks in interrupt handlers. Protobuf: bump to latest.

* DesktopSettings: allow application browser as favourite

* Format sources

* FuriHal: fix pvs warnings
2023-07-05 17:56:52 +04:00
Skorpionm
8c93695d01
[FL-3375] SubGhz: add CC1101 module external (#2747)
* SubGhz: add CC1101 Ext driver
* SubGhz:  move TIM2 -> TIM17 use cc1101_ext
* FuriHal: SPI move channel DMA 3,4 -> 6.7
* Documentation: fix font
* SubGhz: add work with SubGhz devices by link to device
* SubGhz: add support switching external/internal cc1101 "subghz chat"
* SubGhz: add support switching external/internal cc1101 "subghz tx" and "subghz rx"
* SubGhz: add "Radio Settings" scene
* SubGhz: add icon
* SubGhz: add supported CC1101 external module in SubGhz app
* SubGhz: fix check frequency supported radio device
* SubGhz: fix clang-formatted
* Sughz: move dirver CC1101_Ext to lib , compile cmd ./fbt launch_app APPSRC=radio_device_cc1101_ext
* SubGhz: fix CLI
* SubGhz: fix PVS
* SubGhz: delete comments
* SubGhz: fix unit_test
* Format sources
* Update api symbols and drivers targets
* Drivers: find proper place for target option
* SubGhz: external device connected method naming
* Format sources
* SubGhz:  fix module selection menu, when external is not connected
* SubGhz: fix furi_assert(device);
* SubGhz: fix split h and c
* SubGhz: furi_hal_subghz remove preset load function by name
* SubGhz: deleted comments
* Format Sources
* SubGhz: add some consts and fix unit tests
* Sync API Symbols

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-06-30 23:03:36 +09:00
あく
6d9de25494
Furi,FuriHal: various improvements (#2819)
* Lib: adjust default contrast for ERC displays

* Furi: various improvements in check module

* Format Sources

* FurHal: ble early hardfault detection

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2023-06-30 13:52:43 +04:00
Sergey Gavrilov
95c1585df6
[FL-3211][FL-3212] Debug apps: speaker, uart_echo with baudrate (#2812)
* Music player: move music_worker to library
* Music player: drop cli
* Debug: speaker debug app
* Debug: baudrate arg in uart_echo app
* Libs: add music_worker to api
* Libs: add music_worker to targets linker_dependencies

Co-authored-by: あく <alleteam@gmail.com>
2023-06-29 20:23:04 +09:00
MMX
ee96e34767
Fix furi_hal_bus related crashes in plugins (#2799)
* Fix furi_hal_bus issues in plugins
* Rework pwm is running check
* ApiSymbols: update and sync targets

Co-authored-by: あく <alleteam@gmail.com>
2023-06-28 18:25:07 +09:00
Skorpionm
e52fdcf109
[FL-3388] NFC/RFID detector (#2795)
* Field_Validation: add driver fild_validation_rfid
* Field_Validation: add fild_validation_nfc
* Field_Presence: added field validation functions to furi_hal_nfc
* Field_Presence: added field validation functions to furi_hal_rfid
* Field_Presence: add "NFC/RFID detector" app
* Field_Presence: fix GUI "NFC/RFID detector"
* NFC/RFID detector: add auto turn on backlight when field is detected
* NFC/RFID detector: fix syntax errors
* ApiSymbols: fix incorrect name
* FuriHal: filed detect naming
* FieldDetector: fix grammar

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-06-28 18:05:48 +09:00
Sergey Gavrilov
645a7c5989
[FL-3386] Fast FAP Loader (#2790)
* FBT: build and add FastFAP(tm) sections
* Elf file: fast loading fap files. Really fast, like x15 times faster.
* fastfap.py: cleanup unused imports
* Toolchain: 23 version
* Elf File: remove log messages
* Scripts: fix file permissions
* FBT: explicit interpreter for fastfap invocation

Co-authored-by: あく <alleteam@gmail.com>
2023-06-28 17:19:10 +09:00
Sergey Gavrilov
761a14e6e2
[FL-2837][FL-3270] Loader refaptoring: second encounter (#2779)
* Core: rename internal FlipperApplication to FlipperInternalApplication
* FAP Loader: move load_name_and_icon to flipper_application library
* Loader menu: rework api
* View holder: move to gui service
* Loader: simple "loading" worker
* Loader: applications dialog
* Loader: fapping
* Update f18 api
* Apps: remove fap_loader
* Libs, flipper application: store args, rename thread allocation
* Loader: error handling
* Apps: use loader error handling
* Loader: documentation
* FBT: accomodate loader
* Loader: do not raise gui error if loader is locked
* Archive: accomodate loader
* Loader: fix loading message
* Flipper: drop some old dolphin legacy
* Loader: generalize error construction

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-06-23 21:01:40 +09:00
hedger
5334a0ab92
[FL-3376] Fixed GATT attribute order (#2776)
* hal: gatt: swapped rx/tx serial chars order
* hal: gatt: reordered HID attrs to maintain previous order

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-06-15 21:24:47 +09:00
Leopold
b6dbf25f85
furi_hal_nfc: fix rfalTransceiveBitsBlockingTx's 4th argument to bits count rather than bytes count (#2773) 2023-06-14 19:49:26 +09:00
あく
392bd3cde0
FuriHal: remove clock startup time tracking from clean builds (#2764) 2023-06-13 16:02:12 +04:00
Astra
4900e8b7a2
[FL-3284] Fix reading Mifare Classic cards with unusual access conditions and fix emulation of unknown keys (#2620)
* I was outplayed by the C programming language
* Fix emulating empty keys as 0s
* Add exceptions for Detect Reader
* Sync api_symbols.csv for F18
* Outplayed by the C language [X2]

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-06-09 21:41:40 +09:00
Sergey Gavrilov
0e4344a83c
Services: simplify api (#2540)
Co-authored-by: あく <alleteam@gmail.com>
2023-06-09 20:02:47 +09:00
Sergey Gavrilov
62939dd28b
Core2, SRAM2: provide safety gap (#2754)
* Core2, SRAM2: use ob, provide safety gap
* thread: comment about critical section and scheduler state
2023-06-09 19:49:26 +09:00
あく
bff5921266
FuriHal: always clock SMPS from HSI (#2643)
* FuriHal: always clock SMPS from HSI

* FuriHal: add clock startup time check, ensure that we conform to core2 config value

* FuriHal: set sleep mode to legacy if clock startup time is too high

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2023-06-08 17:05:35 +04:00
hedger
e3e64e5e83
[FL-3267] ble: refactored bt gatt characteristics setup (#2587)
* ble: refactored bt gatt characteristics setup
* ble: naming fixes, small optimizations
* ble: expanded bitfields; fixed pvs warnings
* ble: fixed pvs warnings for real
* ble: using FlipperGattCharacteristicDataPropsFixed for char[] props
* ble: removed flipper_gatt_characteristic_props_const_char
* ble: gatt: naming changes
* ble: gatt: fixed device_info service constant attrs sizes
* ble: gatt: copy descriptors to char instances; reworked hid chars to be callback-based; moved max size getter to callback with NULL data; added comments
* ble: gatt: removed hid_svc_report_data_callback
* ble: hid svc: better double loop idx naming
* ble: hid svc: simplified hid_svc_update_info
* ble: gatt: removed magic values; fixed type for HidSvcGattCharacteristicInfo
* ble: gatt: moved long uuids to separate files

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-06-08 18:42:02 +09:00
g3gg0.de
c186d2b0cc
added ISO15693 (NfcV) reading, saving, emulating and revealing from privacy mode (unlock) (#2316)
* added support for ISO15693 (NfcV) emulation, added support for reading SLIX tags
* SLIX: fixed crash situation when an invalid password was requested
* ISO15693: show emulate menu when opening file
* rename NfcV emulate scene to match other NfcV names
* optimize allocation size for signals
* ISO15693: further optimizations of allocation and free code
* ISO15693: reduce latency on state machine reset
* respond with block security status when option flag is set
* increased maximum memory size to match standard
  added security status handling/load/save
  added SELECT/QUIET handling
  more fine grained allocation routines and checks
  fix memset sizes
* added "Listen NfcV Reader" to sniff traffic from reader to card
* added correct description to delete menu
* also added DSFID/AFI handling and locking
* increase sniff log size
* scale NfcV frequency a bit, add echo mode, fix signal level at the end
* use symbolic modulated/unmodulated GPIO levels
* honor AFI field, decrease verbosity and removed debug code
* refactor defines for less namespace pollution by using NFCV_ prefixes
* correct an oversight that original cards return an generic error when addressing outside block range
* use inverse modulation, increasing readable range significantly
* rework and better document nfc chip initialization
* nfcv code review fixes
* Disable accidentally left on signal debug gpio output
* Improve NFCV Read/Info GUIs. Authored by @xMasterX, committed by @nvx
* Fix crash that occurs when you exit from NFCV emulation and start it again. Authored by @xMasterX, committed by @nvx
* Remove delay from emulation loop. This improves compatibility when the reader is Android.
* Lib: digital signal debug output pin info

Co-authored-by: Tiernan Messmer <tiernan.messmer@gmail.com>
Co-authored-by: MX <10697207+xMasterX@users.noreply.github.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-06-08 14:30:53 +09:00
Skorpionm
dbd48a04d4
[FL-3331] SubGhz: add subghz_protocol_registry external API (#2712)
* [FL-3331] SubGhz: add subghz_protocol_registry external API

* F18: fix API version

---------

Co-authored-by: hedger <hedger@nanode.su>
2023-06-06 23:13:41 +04:00
Sergey Gavrilov
3e1f209d64
Furi: smaller critical enter and critical exit macro (#2716)
* Furi: smaller critical enter and critical exit macro
* api: bumped version

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2023-06-06 23:00:43 +04:00
あく
b0555d96e9
[FL-3213] f7: add PB9 to debug pins (#2738)
Co-authored-by: hedger <hedger@users.noreply.github.com>
2023-06-06 21:52:49 +04:00
あく
76c70bdf2c
[FL-3316] Settings: add contrast adjustment (#2737)
Co-authored-by: hedger <hedger@users.noreply.github.com>
2023-06-06 21:46:01 +04:00
あく
1e512b6add
[FL-3293] FuriHal: add system setting to device info, bump device info version (#2736) 2023-06-06 21:15:50 +04:00
あく
d9a9fa0c10
FuriHal: disable bus re-initialization on early init and extra asserts for AHB1,AHB2,AHB3 which must be left intact on entering to FUS (#2725) 2023-06-03 00:59:19 +04:00
gornekich
1d7966f74e
NFC: fix MFC timings (#2719)
* digital signal: add optimization
* nfc test: more restrict tests
* digital signal: build as separate library
* digital signal: remove unused flags, format sources
* digital signal: fix cflag name
* target: fix build for f18 target

Co-authored-by: あく <alleteam@gmail.com>
2023-06-01 21:37:47 +09:00
hedger
8d2ea14f06
[FL-3330] fbt: added hooks for build & dist environments; added FW_ORIGIN_* macro for apps & SDK (#2705)
* fbt: added hooks for build & dist environments
* Moved env hooks to an optional file
* Fixed var name
* Added fw origin to device info
* Bumped device info version
* fbt: added FIRMWARE_ORIGIN option. Different implementation for FW_ORIGIN_* C macro.
* api: bumped versions
* fbt: added fbt_options_local.py
* gitignore: cleanup

Co-authored-by: あく <alleteam@gmail.com>
2023-05-30 01:40:56 +09:00
あく
3de856f8d5
[FL-3295] FuriHal: add bus abstraction (#2614)
* FuriHal: add bus abstraction and port some subsystem to it
* Make PVS happy, cleanup code
* Update API symbols for f18
* F18: backport bus changes from f7
* Revert to STOP2 sleep mode
* Fix downgrading the firmware via updater
* Port iButton TIM1 to furi_hal_bus
* Port Infrared TIM1 and TIM2 to furi_hal_bus
* Just enable the timer bus
* Port furi_hal_pwm to bus API
* Fix include statement
* Port furi_hal_rfid to bus API
* Port furi_hal_subghz and others to bus API
* Remove unneeded include
* Improve furi_hal_infrared defines
* Reset LPTIM1 via furi_hal_bus API
* Crash when trying to enable an already enabled peripheral
* Better defines
* Improved checks
* Lots of macro wrappers
* Copy spi changes for f18
* Fix crashes in LFRFID system
* Fix crashes in NFC system
* Improve comments
* Create FuriHalBus.md
* Update FuriHalBus.md
* Fix crash when launching updater
* Documentation: couple small fixes in FuriHalBus
* FuriHal: fix copypaste in furi_hal_rfid_tim_reset
* FuriHal: reset radio core related peripherals on restart
* FuriHalBus: is enabled routine and bug fix for uart
* RFID HAL: accomodate furi hal bus

Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
2023-05-30 01:05:57 +09:00
micolous
363f555ed7
Implement support for reading Opal card (Sydney, Australia) (#2683)
* Implement support for reading Opal card (Sydney, Australia)
* stub_parser_verify_read: used UNUSED macro
* furi_hal_rtc: expose calendaring as functions
* opal: use bit-packed struct to parse, rather than manually shifting about
* Update f18 api symbols

Co-authored-by: あく <alleteam@gmail.com>
2023-05-29 20:55:55 +09:00
Yukai Li
5f52382098
nfc: Mifare Ultralight C detection (#2668)
* nfc: Add Mifare Ultralight C detection
* nfc: Add display name for MFUL C and hide menu items
    MFUL C unlock and emulation currently not supported, so hide from menu
    if current card is MFUL C
* nfc: Also check response when probing 3DES auth
* nfc: Hide emulate option in saved menu for MFUL if not supported
* nfc: Remove unlock options from saved menu if Ultralight C


Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-05-26 22:19:10 +09:00
hedger
4f054ed535
api: added toolbox/api_lock.h (#2702)
Co-authored-by: あく <alleteam@gmail.com>
2023-05-26 21:57:24 +09:00
Nikolay Minaylov
12dc5b186f
USB HID report timeout (#2682)
Co-authored-by: あく <alleteam@gmail.com>
2023-05-25 23:50:13 +09:00
Georgii Surkov
ed1ebf9b93
[FL-3322] Infrared: respect carrier frequency and duty cycle settings (#2677)
* Make infrared_worker respect carrier frequency and duty cycle
* Update comments

Co-authored-by: あく <alleteam@gmail.com>
2023-05-25 23:38:56 +09:00
hedger
9dedcd07b6
api: added lib/nfc/protocols/nfc_util.h (#2674) 2023-05-15 20:55:22 +09:00