Commit Graph

92 Commits

Author SHA1 Message Date
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
hedger
f8b532f063
[FL-2831] Resources cleanup in updater (#1796)
* updater: remove files from existing resources Manifest file before deploying new resources
* toolbox: tar: single file extraction API

Co-authored-by: あく <alleteam@gmail.com>
2022-09-29 02:13:12 +09:00
Nikolay Minaylov
4241ad24a3
[FL-2797] Signal Generator app (#1793)
* Signal Generator app
* MCO pin initialization in app
* furi_hal_pwm documentation

Co-authored-by: あく <alleteam@gmail.com>
2022-09-29 01:37:24 +09:00
Shane Synan
9f501034c3
Power: Also ask charger if charge done (#1378)
* power: Also ask charger if charge done
* F7: bump API Symbols version
* Lib: remove double include in bq25896.c

Co-authored-by: あく <alleteam@gmail.com>
2022-09-27 00:34:59 +09:00
hedger
efb09380bd
[FL-2836] Fast flash programming mode (#1782)
* updater: lowered logging level for resources unpacking; hal: implemented fast flash write mode
* hal: reworked fast flash programming; clearing most error flags on flash init; changed some flash functions return type from bool to void; scripts: fixed malformed CRC values in update bundles in certain cases;
* hal: flash: larger critical section
* hal: flash: enabling fast write inside critical section
* api_symbols: bump minor version
2022-09-26 20:03:21 +09:00
Astra
3d3c422751
[FL-2674] Show error popup when NFC chip is not init/disconnected (#1722)
* Show error popup when NFC chip is not init/disconnected
* Move to dialogs for the error message
* Fix a memory leak and wrap the hal check
* F7: update api_symbols.csv, add furi_hal_nfc_is_init

Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-09-19 21:46:56 +09:00
SG
b9a766d909 [FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages)
* Added plugin_dist target for fbt to build FAPs
* All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default
* Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them
* Added debugging support for FAPs with fbt debug & VSCode
* Added public firmware API with automated versioning

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-09-15 02:21:03 +09:00
gornekich
1853359d78
[FL-2759], [FL-2766] NFC collect params for mfkey32 attack (#1643)
* nfc: start nfc over rpc
* nfc: add detect reader state
* nfc: add reader analyzer
* nfc: rework reader analyzer
* reader_analyzer: print collected nonces to debug
* reader analyzer: add save on SD card
* reader_analyzer: separate mfkey related part to different file
* mfkey32: add logic for collecting parameters
* nfc: rework pcap with reader analyzer
* nfc: add logger for reader
* nfc: clean up
* nfc: add detect reader view
* nfc: add detect reader and mfkey nonces scenes
* nfc: add mfkey comlplete scene
* nfc: add new assets
* nfc: fix gui
* nfc: fix iso14443-4 UID emulation
* nfc: add no sd card notification
* nfc: fix grammar

Co-authored-by: あく <alleteam@gmail.com>
2022-09-03 21:25:36 +09:00
Max Lapan
4fcb90928c
ST25TB type is not handled (#1679)
We search for ST25TB type cards, but not handling them being found.
As a result, such cards are detected as NFC-A with 8-byte UID, which lead
to read error on emulation attempt.

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2022-08-30 20:33:05 +09:00
Skorpionm
1a4a6d4625
[FL-2769] SubGhz: out debug data to external pin #1665
Co-authored-by: あく <alleteam@gmail.com>
2022-08-27 17:06:25 +09:00
SG
99a7d06f71
Speedup SD card & enlarge your RAM. (#1649)
* FuriHal: sram2 memory manager
* FuriHal: sram2 memory allocator
* FuriHal: allow NULL buffers for txrx in spi hal
* SD card: sector cache
* FuriHal: fix init in memory hal
* RPC: STARTUP instead SERVICE
* Memory: pool "free" command
* Thread: service can be statically allocated in a memory pool

Co-authored-by: あく <alleteam@gmail.com>
2022-08-27 13:25:47 +09:00
SG
9bfb641d3e
[FL-2529][FL-1628] New LF-RFID subsystem (#1601)
* Makefile: unit tests pack
* RFID: pulse joiner and its unit test
* Move pulse protocol helpers to appropriate place
* Drop pulse_joiner tests
* Generic protocol, protocols dictionary, unit test
* Protocol dict unit test
* iButton: protocols dictionary
* Lib: varint
* Lib: profiler
* Unit test: varint
* rfid: worker mockup
* LFRFID: em4100 unit test
* Storage: file_exist function
* rfid: fsk osc
* rfid: generic fsk demodulator
* rfid: protocol em4100
* rfid: protocol h10301
* rfid: protocol io prox xsf
* Unit test: rfid protocols
* rfid: new hal
* rfid: raw worker
* Unit test: fix error output
* rfid: worker
* rfid: plain c cli
* fw: migrate to scons
* lfrfid: full io prox support
* unit test: io prox protocol
* SubGHZ: move bit defines to source
* FSK oscillator: level duration compability
* libs: bit manipulation library
* lfrfid: ioprox protocol, use bit library and new level duration method of FSK ocillator
* bit lib: unit tests
* Bit lib: parity tests, remove every nth bit, copy bits
* Lfrfid: awid protocol
* bit lib: uint16 and uint32 getters, unit tests
* lfrfid: FDX-B read, draft version
* Minunit: better memeq assert
* bit lib: reverse, print, print regions
* Protocol dict: get protocol features, get protocol validate count
* lfrfid worker: improved read
* lfrfid raw worker: psk support
* Cli: rfid plain C cli
* protocol AWID: render
* protocol em4100: render
* protocol h10301: render
* protocol indala26: support every indala 26 scramble
* Protocol IO Prox: render
* Protocol FDX-B: advanced read
* lfrfid: remove unused test function
* lfrfid: fix os primitives
* bit lib: crc16 and unit tests
* FDX-B: save data
* lfrfid worker: increase stream size. Alloc raw worker only when needed.
* lfrfid: indala26 emulation
* lfrfid: prepare to write
* lfrfid: fdx-b emulation
* lfrfid: awid, ioprox write
* lfrfid: write t55xx w\o validation
* lfrfid: better t55xx block0 handling
* lfrfid: use new t5577 functions in worker
* lfrfid: improve protocol description
* lfrfid: write and verify
* lfrfid: delete cpp cli
* lfrfid: improve worker usage
* lfrfid-app: step to new worker
* lfrfid: old indala (I40134) load fallback
* lfrfid: indala26, recover wrong synced data
* lfrfid: remove old worker
* lfrfid app: dummy read screen
* lfrfid app: less dummy read screen
* lfrfid: generic 96-bit HID protocol (covers up to HID 37-bit)
* rename
* lfrfid: improve indala26 read
* lfrfid: generic 192-bit HID protocol (covers all HID extended)
* lfrfid: TODO about HID render
* lfrfid: new protocol FDX-A
* lfrfid-app: correct worker stop on exit
* misc fixes
* lfrfid: FDX-A and HID distinguishability has been fixed.
* lfrfid: decode HID size header and render it (#1612)
* lfrfid: rename HID96 and HID192 to HIDProx and HIDExt
* lfrfid: extra actions scene
* lfrfid: decode generic HID Proximity size lazily (#1618)
* lib: stream of data buffers concept
* lfrfid: raw file helper
* lfrfid: changed raw worker api
* lfrfid: packed varint pair
* lfrfid: read stream speedup
* lfrfid app: show read mode
* Documentation
* lfrfid app: raw read gui
* lfrfid app: storage check for raw read
* memleak fix
* review fixes
* lfrfid app: read blink color
* lfrfid app: reset key name after read
* review fixes
* lfrfid app: fix copypasted text
* review fixes
* lfrfid: disable debug gpio
* lfrfid: card detection events
* lfrfid: change validation color from magenta to green
* Update core_defines.
* lfrfid: prefix fdx-b id by zeroes
* lfrfid: parse up to 43-bit HID Proximity keys (#1640)
* Fbt: downgrade toolchain and fix PS1
* lfrfid: fix unit tests
* lfrfid app: remove printf
* lfrfid: indala26, use bit 55 as data
* lfrfid: indala26, better brief format
* lfrfid: indala26, loading fallback
* lfrfid: read timing tuning

Co-authored-by: James Ide <ide@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-08-24 00:57:39 +09:00
hedger
9829145d8c
fbt: fixed include paths; added PVS-Studio configuration (#1615)
* fbt: fixed include paths for generated version header
* lib: STM32CubeWB: refactored & cleaned up WPAN include paths
* hal: linter fixes for new headers
* fbt: added version_json target
* Added .pvsconfig; split common_defines.h into 2 files
* Added PVS-Studio basic configuration files; updated .gitignore

Co-authored-by: あく <alleteam@gmail.com>
2022-08-23 02:06:17 +09:00
hedger
c846bca280
FuriHal: do not enable LSECSS if BORRST is active (#1590)
Co-authored-by: あく <alleteam@gmail.com>
2022-08-12 22:40:28 +09:00
あく
6ee2c15854
FuriHal,About,Desktop: show provisioned region (#1589)
Co-authored-by: hedger <hedger@users.noreply.github.com>
2022-08-12 13:19:29 +03:00
あく
fae392d84e
[FL-2677] SubGhz: region provisioning (#1574)
* FuriHal: region HAL draft
* FuriHal,SubGhz: complete region provisioning.
* Rpc: fix null pointer dereference.
* Cli: device info formatting
* FuriHal: region provisioning fixes and documentation.
2022-08-11 19:21:56 +10:00
Astra
01eb92db06
Mifare Classic emulation fixes (#1566)
* Add fix for field
* More small bugfixes
* Clean up
2022-08-10 01:45:52 +10:00
SG
eed4296890
MPU Hal (#1492)
* Furi HAL: memory protection unit
* Core: prohibit NULL dereferencing, even for reads.
* Applications: fix NULL dereference
* Core: stack protection by MPU
* MPU: stack region alignment
* Apps: fix null pointer dereferences
* Threads: fix non-null arg check
* Desktop settings: fix null pointer dereference
* Core: documented null-check hack
* Fix null dereference issues
* Apps: args check
* Core: naming fixes
* format code
* Core: remove NONNULL specifier
* FurHal: move MPU initialization to begining, fix enum naming

Co-authored-by: あく <alleteam@gmail.com>
2022-08-04 00:47:10 +09:00
Skorpionm
ec19c11dbe
[FL-2669] SubGhz: add support for loading custom presets (#1398)
* SubGhz: load custom -preset
* SubGhz: fix error prt=0
* SubGhz: load custom preset
* SubGhz: code refactoring to support custom preset
* SubGhz: add custom presert refactoring
* SubGhz: fix alloc history alloc preset
* SubGhz: fix error load file
* SubGhz: fix start custom preset
* SubGhz: fix delete custom preset
* SubGhz: add description Custom_preset_data for CC1101
* SubGhz: debug logging and buffer size rounding

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
2022-07-26 23:16:59 +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
gornekich
f707aa92bb
nfc: fix exit after emulation (#1385) 2022-07-12 23:56:56 +09:00
Michael Marcucci
6b3625f46b
Bluetooth Remote Additions (#1330)
* Update the HID Keycodes to pull from the library
* Composite BLE Report Map, add consumer & mouse HID
* Add Mouse & keyboard bt remote, fixed media remote
* BT Keyboard remove long press shift
* Fix usb hid modifier keys
* Fixed misaligned bad usb keys
* Fix keyboard app keys
* Partial fix for bt app and linux
* Update to work across platforms
* Fix for report ids
* BtHidApp: move variable from bss to model, cleanup naming.
* FuriHal: add const to immutable data declaration

Co-authored-by: あく <alleteam@gmail.com>
2022-07-08 21:36:34 +09:00
あく
c495677eb5
FuriHal: RTC recovery routine and ext3v3 enabled on start (#1357)
* FuriHal: leave ext3v3 enabled on start
* FuriHal: RTC recovery routine, cleanup resources

Co-authored-by: SG <who.just.the.doctor@gmail.com>
2022-07-05 00:26:02 +10:00
gornekich
5769595e67
NFC emulation software tunning (#1341)
* digital_signal: optimize calculationxx
* firmware: add listen start and listen rx
* digital signal: rework with fixed point calculation
* nfc: tune timings
* nfc: fix array overflow
* mifare classic: fix key access
* nfc: rework spi bus access
* nfc: rework listen mode with st25r3916 calls
* digital signal: speed up digital_signal_append()
* digital signal: remove unused profiling
* nfc: clean up code
* nfc: correct sleep state
* nfc: add unit tests
* nfc: fix memory leak in unit test
* digital_signal: remove unused code
* nfc: fix incorrect sak load in pt memory

Co-authored-by: あく <alleteam@gmail.com>
2022-07-03 23:51:50 +09:00
Yukai Li
556af0b82b
nfc: NTAG21x complete emulation (#1313)
* nfc: Refactor Mifare Ultralight feature flags
  Unify them in both reader and emulator to make handling easier
* nfc: Refactor MFUL PWD_AUTH and add AUTHLIM counter
* nfc: Add MFUL EV1 VCSL command emulation
* nfc: Enforce message size check in MFUL emulation
  Also fix READ_CNT byte order, but it's not fully working
* nfc: Add MFUL auth counter serialization
  Also fill counter on successful read from tag
* nfc: Fix MFUL INCR_CNT emulation
* nfc: Fix MFUL READ_CNT emulation
* nfc: Refactor MFUL emulation and implement full write support
* nfc: Fix Mifare Ultralight serialization
* nfc: Add MFUL OTP/CC handling
* nfc: Make sure MF0UL21 dynamic lock byte 3 also reads 0xBD
* nfc: Small MFUL refactor and fix CFGLCK behavior
* WIP: nfc: MFUL read support with ASCII mirror and auth roll-over
  This is too complex and I don't like it
* nfc: Simplify MFUL read emulation, fix mirror range check
* nfc: Implement MFUL auth and ASCII mirror for FAST_READ
* nfc: Fix MFUL read roll-over with AUTH0 set
* nfc: Implement MFUL read counter increment
* nfc: Align ASCII mirror to NTAG21x behavior
* nfc: Handle invalid command in MFUL emulation
* nfc: Fix MFUL static lock check
* nfc: Refactor MFUL emulation to use cached config pages
* nfc: Refactor MFUL auth counter to count up instead of down
* nfc: Add missing NULL check
* WIP: nfc: Various MFUL emulation behavior tweaks
* WIP: nfc: More MFUL emulation behavior adjustments
* nfc: Match AUTHLIM emulation to NTAG21x behavior
* nfc: Fix MFUL dynamic lock emulation
* nfc: Fix typo in MFUL read counters
* nfc: Fix typo in MFUL FAST_READ emulation
* nfc: Increase emulation TX buffer size
  Enough space for if someone requests FAST_READ of all pages of an NTAG
* nfc: Fix MFUL negative verification counter overflow
* nfc: Change auth counter kv name
* nfc: Fix NTAG I2C FAST_READ emulation
* nfc: Fix NTAG21x config reload behavior

Co-authored-by: あく <alleteam@gmail.com>
2022-06-22 00:04:35 +09:00
あく
839e52ac32
[FL-2591] Furi: remove CMSIS thread api, migrate to FuriThread, remove unused CMSIS APIs (#1333)
* Furi: remove CMSIS thread api, migrate to FuriThread, remove unused CMSIS APIs
* Furi: magic thread catcher validating thread completion; backtrace improver
* Furi: allow furi_thread_get_current_id outside of thread context
* Furi: use IRQ instead of ISR for core primitives
2022-06-20 18:54:48 +04:00
あく
fb4d4011f4
SubGhz: allow refill attempt at the end of transmission (#1314) 2022-06-14 11:27:03 +10:00
あく
b2132b2ec7
Nfc: async pcap worker (#1315)
* Nfc: async pcap worker
* nfc: add pcap save to classic emulation

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2022-06-14 11:14:13 +10:00
あく
936a2f64b2
[FL-2580] FuriHal: add more supported radio stacks (#1301)
* FuriHal: add more supported radio stacks
* Bt: correct ble stack enum value
* Bt: update cli testing commands implementation
* Scripts: always emitting ob data to update manifest; added ob_custradio.data for non-light radio stacks
* Scripts: added stack type whitelist & disclaimer message
* ble: remove scanner
* ble: remove HCI and advances ble stacks support
* bt: correctly close RPC session before bt reinit
* Scripts: update bundler: estimating flash layout & refusing to build dangerous packages; app frame: not adding redundant log handlers
* Docs: additional details on bundling updates; fixed updater error codes
* Docs: wording fixes for OTA.md

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
2022-06-09 18:07:42 +09:00
Kevin Wallace
9c9f66a30f
nfc: add debug PCAP output, refactor Mifare DESFire following #1095 (#1294)
* nfc: refactor nfc_worker_read_mifare_desfire to use furi_hal_nfc_tx_rx
  Renames furi_hal_nfc_exchange_full to furi_hal_nfc_tx_rx_full, and
  rewrites it to use furi_hal_nfc_tx_rx.  This eliminates the final
  remaining use of furi_hal_nfc_exchange, so remove that.
* nfc: write debug.pcap when debug mode enabled
  Limited to NFC protocols that use furi_hal_nfc_tx_rx to communicate.
* switch to Doxygen style comment

Co-authored-by: Kevin Wallace <git+flipperzero@kevin.wallace.seattle.wa.us>
Co-authored-by: あく <alleteam@gmail.com>
2022-06-09 17:35:34 +09:00
Nikolay Minaylov
cfb1a0d01c
Hardware LED blinking (#1303)
* Hardware LED blinking notification messages
* Blink: fix crash on exit, reset blinking on exit
* Lib: remove unused UNUSED

Co-authored-by: あく <alleteam@gmail.com>
2022-06-09 16:33:46 +09:00
UberGuidoZ
2c4b2b8775
Fixing typo across many files (#1287)
* Update furi_hal_subghz.c
* Update subghz_scene_read_raw.c
* Update subghz_i.c
* Update came_twee.c
* Update secplus_v2.c
2022-06-01 07:35:31 +09:00
Gary
533f12af15
Change "FuriHalNfc Current state" trace to only log on change of state #1272
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2022-05-26 16:00:59 +03:00
Yukai Li
0d5d4c8688
RFC: NTAG I2C support (#1227)
* nfc: Add NTAG I2C (Plus) 1K/2K read support
* nfc: Add rudimentary NTAG I2C emulation
* nfc: Closer NTAG I2C emulation plus debug logging
* nfc: Fix NTAG I2C sector select emulation
* nfc: Add security for NTAG I2C
* nfc: Send NAK correctly for MFUL reads
* nfc: Better emulate NTAG I2C SECTOR_SELECT behavior
* nfc: Fix non-I2C Ultralight read
  Per datasheet, max sector for SECTOR_SELECT is 0xfe, so 0xff is OK
  as uninit value
* nfc: Only read sig for NTAG if supported
  Attempting to read signature breaks immediate call to sector select on
  NTAG I2C original for some reason, so don't read signature if the
  command is not supported

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2022-05-26 15:55:29 +03:00
gornekich
d31578508a
[FL-2245] Introduce Mifare Classic Emulation (#1242)
* digital signal: introduce digital signal
* nfca: add nfca signal encoder
* nfc: add mifare classic emulation scene
* nfca: add classic emulation support to lib and hal
* mifare classic: support basic read commands
* nfc: add mifare classic menu scene
* mifare classic: start parsing commands in emulation
* mifare classic: add nested auth
* nfc: fix errors
* mifare classic: add encrypt function
* nfc: fix mifare classic save
* lib hex: add hex uint64_t ASCII parser
* flipper format: add uint64 hex format support
* nfc: add mifare classic key map
* nfc: hide mifare classic keys on emulation
* mifare classic: add NACK responce
* nfc: add partial bytes support in transparent mode
* nfc: mifare classic add shadow file support
* digital signal: move arr buffer from BSS to heap
* mifare classic: process access bits more careful
* nfca: fix memory leack
* nfc: format sources
* mifare classic: cleun up

Co-authored-by: あく <alleteam@gmail.com>
2022-05-24 17:00:15 +03:00
gornekich
2017baac48
[FL-2441] BLE add Power state, fix double connection (#1238)
* battery service: add power state charachteristic
* bt: update power state on charging / discharging events
* ble config: support only one connection
* bt: always update flow control characteristic
* bt: fix power state update
* bt: simplify updating power state
* bt: don't update flow control charachteristic
2022-05-24 16:42:02 +03:00
あく
e8de94ca00
Drop libs rtc (#1248) 2022-05-20 05:53:33 +10:00
あく
9c3f465afd
[FL-2537, FL-2539, FL-2534, FL-2534, FL-2525]: UI and UX improvements (#1246)
* FL-2537: ON/OFF buttons
* FL-2539: cancelable lowbatt shutdown
* FL-2534: update storage format results screen, cleanup dialog_ex usage.
* FL-2534: storage setting UX rework
* FL-2525: unify arrows icons
* Remove unused icons
* UI: Rename Ok to OK
2022-05-20 02:07:45 +10:00
hedger
597ee5b939
[FL-2527] Updater: Migrating to new manifest path convention (#1213)
* Updater: Migrating to new manifest path convention
* RPC: Added update preparation status to RPC
* RPC: bumped protobuf submodule
* Bumped protobuf_version.h
* FuriCore: add missing include. Lib: make mlib smaller
* Explicitly tell where we have doubles and fix random in animations
* makefile: added -DLFS_NO_DEBUG
* Updater: path len constant dedup
* Updater: checking for hardware version match before parsing manifest
* LD: moved _DRIVER_CONTEXT sections to .bss, where they belong.
* LD: avoiding PROBGITS warning, moved _CONTEXT to data
* Updater: Added version check on update package - refusing to install outdated

Co-authored-by: あく <alleteam@gmail.com>
2022-05-11 12:45:01 +03:00
Skorpionm
f04d0eea96
SubGhz: add protocol MegaCode (#1204)
* SubGhz: add protocol MegaCode
* SubGhz: check for guard time injection at the end of buffer
* SubGhz: rollback samples counting in trasmitter
* SubGhz: fix subghz_file_encoder_worker incorrect pulse sequence
* Input: tune debounce interval
* SubGhz: fix spelling in subghz_file_encoder_worker_add_level_duration

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-05-08 20:50:20 +03:00
hedger
4d6b170769
[FL-2520] FW build with -Wextra (#1185)
* Fixing compiler warnings with -Wextra
* More warnings suppression, WIP
* Even more warning fixes
* Added new lines at end of text files.
* Padding fix
* Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline
* Fixes for Secplus v1
* -additional warnings
* +-Wredundant-decls fixes
* FuriHal: print stack overflow task name in console
* FuriHal: add missing include

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-05-06 16:37:10 +03:00
あく
f5175e1388
Music player rework (#1189)
* Music player: cli tool and new worker
* Music player cli: flush message
* Music player: fix note calculation
* MusicPlayer: fix # parsing and add magic
* FuriHal: improve speaker volume handling. MusicPlayer: minor sustain improvements
* MusicPlayer: fix buffer overseek
* FuriHal: drop unused variables
* MusicPlayer: LFO 4 magic
* MusicPlayer: add RTTTL parser
* MusicPlayer: refactoring and add file open dialog on start
* MusicPlayer: fix memcpy issue and more
* FuriHal: force disconnect USB on early init and then leave usb line alone for some time.
* FuriHal: switch speaker to old volume. MusicPlayer: fix incorrect note history, and drop lfo from worker.

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2022-05-05 12:49:59 +03:00
Georgii Surkov
01434265f6
[FL-2399, FL-2261] Tickless sleep shenanigans (#1168)
* Disable USART in sleep
* Restore UART state on suspend/resume
* FuriHal: Enable stop mode and add insomnia to I2C and SPI
* Remove IDLE interrupt
* FuriHal: add FPU isr and disable all FPU interrupt, add core2 stop mode configuration on deep sleep
* FuriHal: tie stop mode debug with debug rtc flag
* FuriHal: adjust flash latency on clock switch, tie mcu debug with RTC debug flag
* FuriHal: move resource init to early stage
* Add EXTI pending check, enable debug traps with compile-time flag
* Wrap sleep debug functions in conditional compilation
* Remove erroneous changed
* Do not use CSS, remove it from everywhere
* Enable/disable USB on VBUS connect (prototype)
* FuriHal: add LPMS and DEEPSLEEP magic, workaround state inconsistency between cores
* FuriHal: honor c1 LMPS
* USB mode switch fix
* Applications: add flags and insomnia bypass system
* Correct spelling
* FuriHal: cleanup insomnia usage, reset sleep flags on wakeup, add shutdown api
* FuriHal: extra check on reinit request
* FuriHal: rename gpio_display_rst pin to gpio_display_rst_n
* FuriHal: add debug HAL
* FuriHal: add some magic to core2 reload procedure, fix issue with crash on ble keyboard exit
* FuriHal: cleanup ble glue, add BLE_GLUE_DEBUG flag
* FuriHal: ble reinit API, move os timer to LPTIM1 for deep sleep capability, shutdown that works
* FuriHal: take insomnia while shutdown
* Remove USB switch on/off on VBUS change
* Better tick skew handling
* Improve tick consistency under load
* Add USB_HP dummy IRQ handler
* Move interrupt check closer to sleep
* Clean up includes
* Re-enable Insomnia globally
* FuriHal: enable CSS
* FuriHal: remove questionable core2 clock shenanigans
* FuriHal: use core1 RCC registers in idle timer config
* FuriHal: return back CSS handlers, add lptim isr dispatching

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: nminaylov <nm29719@gmail.com>
2022-04-29 16:29:51 +03:00
Nikolay Minaylov
0eac917f91
[FL-2163] CLI: Separate session from CLI service (#1130)
* CLI: session refactoring
* Added forgotten define
* Desktop lock state save
* Dolphin: use proper type for value returned by dolphin_state_xp_to_levelup

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-04-29 15:02:17 +03:00
hedger
7ce305fca3
[FL-2269] Core2 OTA (#1144)
* C2OTA: wip
* Update Cube to 1.13.3
* Fixed prio
* Functional Core2 updater
* Removed hardware CRC usage; code cleanup & linter fixes
* Moved hardcoded stack params to copro.mk
* Fixing CI bundling of core2 fw
* Removed last traces of hardcoded radio stack
* OB processing draft
* Python scripts cleanup
* Support for comments in ob data
* Sacrificed SD card icon in favor of faster update. Waiting for Storage fix
* Additional handling for OB mismatched values
* Description for new furi_hal apis; spelling fixes
* Rework of OB write, WIP
* Properly restarting OB verification loop
* Split update_task_workers.c
* Checking OBs after enabling post-update mode
* Moved OB verification before flashing
* Removed ob.data for custom stacks
* Fixed progress calculation for OB
* Removed unnecessary OB mask cast

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-04-27 18:53:48 +03:00
Nikolay Minaylov
ff8eb87419
BadUSB Speedup: set USB HID interval to 2ms (#1166)
Co-authored-by: あく <alleteam@gmail.com>
2022-04-25 14:57:43 +03:00
gornekich
7c692a9f36
[FL-2432], [FL-2487] Rework bt keys load and save (#1139)
* bt keys: rework load and save with saved_struct
* bt: rename bt keys storage functions
* furi_hal_nfc: allow context switch during emilation
* bt settings: rework with saved struct
* infrared: replace file worker with dialogs and storage
* Core, Loader: fix thread allocation tracking, much better, so wow.

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-04-21 18:36:53 +03:00
Georgii Surkov
df66f4f6ba
[FL-2480] Use SysTick as the main OS timer (#1140)
* Use SysTick as OS tick timer
* Use LPTIM2 as tickless idle timer
* Remove dummy LPTIM2 IRQ handler
* Clean up clock init code
* Rename os timer to idle timer
* Advance hal ticks along with FreeRTOS's
* Improve SysTick control during tickless idle
* Improve idle timer precision
* Correct SysTick IRQ priority
* Main, FuriHal: move system startup to separate thread
* Minor code cleanup

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-04-21 16:15:19 +03:00
gornekich
cea118cf2d
[FL-2470, FL-2385, FL-2411] NFC fixes (#1138)
* mifare classic: increase data exchange timeout
* nfc: exit from app if can't parse file
* furi_hal_nfc: allow to switch context during detect

Co-authored-by: あく <alleteam@gmail.com>
2022-04-20 17:08:36 +03:00
gornekich
956788c09b
[FL-2369] NFC refactoring (#1095)
* nfc: clean up scenes
* nfc worker: remove field on from worker
* nfc worker: move full data exchange to furi hal
* nfc_device: check UID length
* nfc protocol: introduce mifare common API
* nfc: move common data to furi hal nfc
* nfc: rename emv_decoder -> emv
* nfc: move emv data structure to emv lib
* nfc: remove deactivate after detection
* nfc: rework furi hal nfc detect
* nfc: clean up CLI commands and type
* nfc: remove unused includes and function
* nfc: add TxRxType enum
* nfc: read mifare ultralight refactoring
* nfc: refactore mifare ultralight start
* rfal: fix custom data exchange
* nfc: refactor read bank card
* nfc: refactor read emv application
* nfc: refactor emv test emulation
* nfc: refactor uid emulation
* nfc: add limit to uid emulation logger
* fix source formatting
* furi_hal_nfc: fix data exchange full
* nfc: fix mifare ultralight type load

Co-authored-by: あく <alleteam@gmail.com>
2022-04-19 18:23:58 +03:00