Commit Graph

37 Commits

Author SHA1 Message Date
gornekich
725981f431
[FL-663] Read EMV cards (#460)
* nfc: add emv decoder
* api-hal-nfc: add data exchange api
* nfc_worker: add read emv routine
* nfc: add emv reader view
* nfc: add support for Mastercard reading
* api-hal-nfc: fix incorrect merge changes
* nfc_worker: set to zero emv app object on each cycle
* api-hal-nfc: add api for f6 target
* nfc: move emv_decoder to lib folder

Co-authored-by: あく <alleteam@gmail.com>
2021-05-18 21:12:01 +03:00
あく
6d648da003
[FL-835] Factory reset. Cli refactoring. (#466)
* ApiHal: add boot flags. Internal storage: add factory reset.
* Bootloader: correct doxygen comment format.
* Cli: change cli callback signature. Applications: update API usage. Add factory_reset cli command.
2021-05-18 16:57:39 +03:00
Albert Kharisov
3114a2d4b8
[FL-1156, FL-1249] Add IRDA encoder/decoder library (#451)
* Add cscope db generation
* Add api-hal-irda, TIM2: HAL->LL
* Add libirda: pwm decoding
* Universal state machine
* Add irda decoder library
* Move IRDA capture to standalone tool
* Add encoder/decoder samsung32, NEC, fix bugs
* Port current App to new Irda lib
* Fix clang format for test data
* Port IRDA api-hal to f6

Co-authored-by: あく <alleteam@gmail.com>
2021-05-18 13:51:00 +03:00
SG
ba0419276e
[FL-1311] F6, app LF-RFID: Updated timer api and config (#465)
* F6, app LF-RFID: Updated timer api and config
* Api hal rfid: updated comments

Co-authored-by: あく <alleteam@gmail.com>
2021-05-18 12:54:48 +03:00
gornekich
fb73d3bd52
[FL-1214] NFC application (#448)
* platform: include only used api-hal files
* api-hal-nfc: introduce nfc hal
* nfc_worker: rework nfc worker
* nfc: move nfc from services to applications, add startup hook
* api-hal-nfc: init nfc worker in api_hal_detect
* nfc: rework nfc application
* nfc: fix app exit
* api-hal-nfc: init nfc worker only once
2021-05-06 22:51:20 +03:00
SG
46bc515c6a
Low frequency RFID app [Read stage] (#385)
* App Lfrfid: init
* HAL-resources: add external gpios
* HAL-pwm: fix frequency calculation
* App LFRFID: generic manchester decoder
* App LFRFID: em-marine decoder
* App iButton: fix dwt timing acquire
* App LFRFID: rfid reader
* App LFRFID: temporary read keys on read scene
* App LFRFID: remove atomic bool init.
* App LFRFID: add *.c to build
* App LFRFID: unstable HID decoder
* App LFRFID: HID-26 reading
* HAL OS: disable sleep
* App LFRFID: HID-26 reader: remove debug
* App LFRFID: static data decoder-analyzer
* App LFRFID: very raw Indala decoder
* App LFRFID: multiprotocol reader
* App LFRFID: more reliable HID decoder
* App LFRFID: syntax fix
* App LFRFID: simple read scene
* Gui: force redraw on screen stream connect
* HAL-OS: allow sleep
* App LFRFID: notify api, tune view, tune scene
* App LFRFID: simple rfid emulator
* App LFRFID: more scenes, more reliable EM decoder.
* App LFRFID: format fix
* App LFRFID: warning fix
* Api-hal-resources: add rfid pins, rename external pins
* App LFRFID: remove unused emulator
* App LFRFID: use new gpio hal api
* App accessor: use new ext gpio name
* App LFRFID: remove unused emulator
* App LFRFID: remove debug gpio
* Api-hal-resources: alternate functions init
* Api-hal-rfid: new api
* Api-hal-ibutton: new api
* Api-hal: new headers
* App LFRFID: use new api in reader subroutines
* App LFRFID: use new api in emulator subroutines
* App LFRFID: remove old app
* App LFRFID, App iButton: fix memleak
* Api-hal-rfid: comments
* App LFRFID: pulse joiner helper, it combines pulses of different polarity into one pulse suitable for a timer
* App LFRFID: pulse joiner, now can accept only ne pulse
* App LFRFID: pulse joiner, fixes
* App LFRFID: EM encoder and emulation
* App LFRFID: format fixes
* App LFRFID: emmarine encoder cleanup
* App LFRFID: HID Encoder blank
* App LFRFID: Indala Encoder blank
2021-05-04 16:21:16 +03:00
あく
43ff095724
Api-hal-power: reset routine. Power: safe to poweroff message, cleanup. (#436) 2021-04-30 07:51:48 +03:00
gornekich
239c174610
[FL-1062] Add cli commands for IrDA (#409)
* irda: add ir_tx command
* api-hal-vcp: add receive with timeout
* cli: add command termination check function
* irda: add cli_rx command
* cli: reduce timeout for Ctrl+C command check
* irda: fix ir_rx command
* irda: add ir_tx cli command hints

Co-authored-by: あく <alleteam@gmail.com>
2021-04-19 19:36:45 +03:00
Albert Kharisov
aa20a78b0e
[FL-164] Add bootloader version (#417)
* Add bootloader versioning
* Move some logic to api-hal-version
* Backport to f4
* Dolphin: update version screen layout, make it more readable

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-04-19 19:30:25 +03:00
あく
616b7325c6
[FL-952] I2C: correctly handle STOP flags. Apps: increase cli_app stack size. (#408)
* I2C: correctly handle STOP flags. Apps: increase cli_app stack size.
* API HAL Power: simplify api_hal_power_dump_state. Format sources.
2021-04-12 21:09:38 +03:00
あく
5d08b35b54
[FL-1009, FL-1118] Better initialization sequence and V8 hardware support (#406)
* Interrupt manager: add memory barriers.
* ISRs: remove TIM17 dead code.
* API HAL Delay: rename initialization routine and move to API-HAL
* Main: move FURI initialization to the start.
* API HAL GPIO: drop CC1101 shenanigans, COMP inversion for new boards.
* IButton: migrate Cyfral and Metakom to RFID comp routine, make it compatible with new boards.
* RFID: Better keyboard handling and shutdown routines
2021-04-11 16:47:36 +03:00
あく
81ace53cc1
Api Hal OS/Power: split insomnia and return to where it belongs. (#393) 2021-03-31 20:55:00 +03:00
あく
5439e232cc
[FL-950] CC1101 Stage1, SPI Refactoring, Drivers layer (#386)
* API HAL SPI: refactoring, split into layers, prepare ST HAL separation. API HAL SubGhz: initialize on start. Drivers: add basic cc1101 driver. Update API usage. Debug: increase max debugger port speed. Remove subghz apps.
* CC1101: chip status handling. ApiHalSpi: increase SubGhz bus speed to 8mhz. F4: backport subghz initialization.
* Api Hal SubGhz: rx path and frequency. CC1101: frequency control.
* SubGhz Application: basic tests
* SubGhz app: tone and packet test. API HAL SUBGHZ: update configs, add missing bits and pieces.
2021-03-31 20:52:26 +03:00
gornekich
610f4f5d73
[FL-41] api-hal doxygen documentation (#387)
* targets/api-hal: rework documentation in doxygen style
* core/api-hal: rework documentation in doxygen style
* core/furi: rework documentation in doxygen style
* drivers: rework documentation in doxygen style

Co-authored-by: あく <alleteam@gmail.com>
2021-03-24 12:35:33 +03:00
あく
4ae5bd3d75
[FL-944] Preliminary BLE fix: leave PC4 unconfigured. Cleanup code. (#381)
* GPIO: disable CC1101 GD0 pin configuration. API HAL OS: enable sleep. Cleanup interrupts and gpio code.

* API HAL: disable deep sleep, add light sleep, use it instead.
2021-03-19 17:23:53 +03:00
its your bedtime
fc12f91a64
[FL-378] Update usb descriptor to display unique flipper name (#373)
* update usb descriptor to display unique flipper name

* added flip_ prefix for usb descriptor, updated manufacturer string

* include name in ApiHalVersionOTP struct, update assets.py

Co-authored-by: あく <alleteam@gmail.com>
2021-03-12 12:18:13 +03:00
gornekich
0af6c9882e
[FL-580] Prepare BLE for certification (#376)
* api-hal-bt: separate bt init to core init and app start

* bt: add continuous TX and RX tests

* bt: finish rx test on Back button click

* api-hal-bt: check core 2 started, same f4 and f5 implementation

* bt: refactoring, move hopping test logic to main thread

Co-authored-by: あく <alleteam@gmail.com>
2021-03-11 12:31:07 +03:00
あく
2f14f6dac5
API HAL I2C: add timeout support. Update I2C API usage by drivers. (#374)
* API HAL I2C: add timeout support. Update I2C API usage by drivers.
* F4: Add missing API HAL Vibro implementation.
2021-03-10 16:23:54 +03:00
SG
fef16a8e7a
SD card v7 BSP (#361)
* Outdated apps: add api-light-usage

* Gpio: update SD card CS pin settings

* API-power: added fns to disable/enable external 3v3 dc-dc

* API-gpio: separated SD card detect routines

* Resources: removed sd cs pin

* SD card: low level init now resets card power supply

* App SD-filesystem: use new card detect fns

* SD card: fix low level init headers

* SD card: more realilable low level init, power reset, exit from command read cycle conditionally

* App SD-filesystem: led notifiers, init cycling

* SD card: backport to F4

* SD card: handle eject in init sequence

* SD card: api to set level on detect gpio

* SPI: api to set state on bus pins

* SD card: set low state on bus pins while power reset

Co-authored-by: coreglitch <mail@s3f.ru>
2021-03-09 14:53:33 +03:00
gornekich
73e5379520
[FL-936] CLI commands for vibro, led and display backlight support (#367)
* api-hal: add api-hal-vibro
* cli: add vibro cli command
* cli: add cli commands for led and disp backlight
2021-03-08 18:48:14 +03:00
gornekich
cfa76f19d0
[FL-905] Add battery health state monitoring in power app (#358)
* add battery health reading from gauge
* add battery health reading to api-hal-power
* update battery health in power application

Co-authored-by: あく <alleteam@gmail.com>
2021-03-02 19:07:26 +03:00
あく
38011e88f3
API HAL: takeover i2c initialization and abstraction. Update I2C drivers to match new api. Back port API HAL to bootloader and enable light support for F5. (#356)
Co-authored-by: coreglitch <mail@s3f.ru>
2021-03-02 14:45:47 +03:00
coreglitch
2fbf427e0a
Switch sub-1GHz band (#349)
* switch band
* extract subghz api to files
2021-02-25 13:29:00 +03:00
あく
68a3f6b4b7
[FL-873] Add F5 target, lp5562 driver and api-hal-light (#347)
* Add F5 target, lp5562 driver and api-hal-light. Update api-usage, switch to F5 by default.
* API HAL: add i2c and hardware version api. Dolphin: show hardware version.
* OTP version generator and flashing utility.
* Assets script: fix code formatting
* Backport F5 changes to F4
* F4: disable insomnia, prevent damage to BLE RX path
* F5 HAL API Light: remove magic delay to fix magic BLE
* Dolphin: HW target validation on start
* invert RSSI indication in sub-1
* API HAL: rename board to body in version api
* Gpio tester: detach and release viewport on exit

Co-authored-by: aanper <mail@s3f.ru>
2021-02-18 15:49:32 +03:00
あく
b835d7a451
[FL-872] Furi, API-HAL, App-Loader cleanup and improvements (#334)
* Furi: replace obsolete furiac_exit with osThreadExit, drop obsolete apis and test. Rename systemd to flipper and move to separate file, cleanup. ApiHal: Rename timebase to os and move freertos hooks there, move insomnia api to power module.
* Furi: new thread helper
* Furi: cleanup thread documentation
* Flipper, AppLoader: update to use FuriThread. Update tasks signatures to match FuriThreadCallback signature.
* F4: rename API_HAL_TIMEBASE_DEBUG to API_HAL_OS_DEBUG
* Applications: rename FuriApplication to FlipperApplication, use FuriThreadCallback signature for apps.
* C++ app template sample, new exit method
2021-02-12 20:24:34 +03:00
あく
584c0962d8
[FL-781] FURI, CLI, stdlib: stdout hooks, integration between subsystems, uniform printf usage (#311)
* FURI stdglue: stdout hooks, local and global, ISR safe printf. Uniform newlines for terminal/debug output. Power: prevent sleep while core 2 has not started.
* Furi record, stdglue: check mutex allocation
* remove unused test
* Furi stdglue: buferized output, dynamically allocated state. Furi record: dynamically allocated state. Input dump: proper line ending. Hal VCP: dynamically allocated state.
* Interrupt manager: explicitly init list.
* Makefile: cleanup rules, fix broken dfu upload. F4: add compiler stack protection options.
* BLE: call debug uart callback on transmission complete
* FreeRTOS: add configUSE_NEWLIB_REENTRANT
* API HAL Timebase: fix issue with idle thread stack corruption caused by systick interrupt. BT: cleanup debug info output. FreeRTOS: disable reentry for newlib.
* F4: update stack protection CFLAGS to match used compiller
* F4: disable compiller stack protection because of incompatibility with current compiller
* Makefile: return openocd logs to gdb
* BLE: fixed pin, moar power, ble trace info.
* Prevent sleep when connection is active
* Makefile: return serial port to upload rule, add workaround for mac os
* Furi: prevent usage of stack for cmsis functions.
* F4: add missing includes, add debugger breakpoints
* Applications: per app stack size.
* Furi: honor kernel state in stdglue
* FreeRTOS: remove unused hooks
* Cleanup and format sources

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2021-01-29 03:09:33 +03:00
DrZlo13
8f9b2513ff
[FL-140] Core api dynamic records (#296)
* SYSTEM: tickless mode with deep sleep.
* Move FreeRTOS ticks to lptim2
* API: move all sumbodules init routines to one place. Timebase: working lptim2 at tick source.
* API Timebase: lp-timer routines, timer access safe zones prediction and synchronization. FreeRTOS: adjust configuration for tickless mode.
* NFC: support for tickless mode.
* API Timebase: improve tick error handling in IRQ. Apploader: use insomnia mode to run applications.
* BLE: prevent sleep while core2 starting
* HAL: nap while in insomnia mode
* init records work
* try to implement record delete
* tests and flapp
* flapp subsystem
* new core functions to get app stat, simplify core code
* fix thread termination
* add strdup to core
* fix tests
* Refactoring: remove all unusued parts, update API usage, aggreagate API sources and headers, new record storage
* Refactoring: update furi record api usage, cleanup code
* Fix broken merge for freertos apps
* Core, Target: fix compilation warnings
* Drop firmware target local
* HAL Timebase, Power, Clock: semaphore guarded access to clock and power modes, better sleep mode.
* SD-Filesystem: wait for all deps to arrive before adding widget. Core, BLE: disable debug dump to serial.
* delete old app example-ipc
* delete old app fatfs list
* fix strobe app, add input header
* delete old display driver
* comment old app qr-code
* fix sd-card test, add forced widget update
* remove unused new core test
* increase heap to 128k
* comment and assert old core tests
* fix syntax

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-01-20 19:09:26 +03:00
あく
6c4983c6b6
HAL Timebase, Power, Clock: semaphore guarded access to clock and power modes, better sleep mode. (#307) 2021-01-20 10:43:12 +03:00
あく
c8aca9ef48
[FL-667] Power saving: deep sleep in tickless state (#300)
* SYSTEM: tickless mode with deep sleep.
* Move FreeRTOS ticks to lptim2.
* API: move all sumbodules init routines to one place.
* Timebase: working lptim2 at tick source.
* API Timebase: lp-timer routines, timer access safe zones prediction and synchronization. 
* FreeRTOS: adjust configuration for tickless mode.
* NFC: support for tickless mode.
* API Timebase: improve tick error handling in IRQ. 
* Apploader: use insomnia mode to run applications.
* BLE: prevent sleep while core2 starting.
* HAL: nap while in insomnia mode.

Co-authored-by: coreglitch <mail@s3f.ru>
2021-01-18 18:08:58 +03:00
あく
6928122650
FL-53: new NFC worker, A/B/F/V poll and display. (#283)
* GUI: view. Flooper-blooper fix compilation error.
* GUI: view and viewdispatcher bones
* GUI: view implementation, view models, view dispatcher
* GUI: view navigation, model refinement. Power: use view, view dispatcher.

* HAL Flash: proper page write. Dolphin: views. Power: views

* Dolphin: transition idle scree to Views
* Dolphin: input events on stats view. Format sources.

* HAL: flash erase. Dolphin: permanent state storage.

* Dolphin: first start welcome. HAL: flash operation status, errata 2.2.9 crutch.

* NFC: rewrite worker
* NFC: add support for B,F,V.
* NFC: replace rfal irq hanlder with realtime thread, more details about cards.

* Bootloader: LSE and RTS shenanigans, LED control, morse code for LSE failure error.

* F4: stop in Error_Handler

* BLE: handle working FUS, but empty radio stack.

* HAL: alive FUS is now sufficient for flash controller access

* Dolphin: update model after state load

* NFC: detect navigation

* RFAL: use osPriorityISR for isr thread

* NFC: emulation

* Bootloader: rollback incorrectly merged rename

* Dolphin: rollback incorrectly merged changes

* RFAL: remove volatile from thread attr

* RFAL: do not call platform ErrorHandler, error codes is enough

* NFC: improved error handling

* Format sources

* NFC: reset detect view model on start

* Format sources

* update codeowners

* NFC: hide last info if no card detected
2021-01-11 18:42:25 +06:00
あく
9a257b048e
Power: more info (#274) 2020-12-23 00:16:32 +06:00
DrZlo13
8b6e7fd4ae
FL-443 Move sd card to second spi (#271)
* sd card spi 2 fix, add spi mgr
2020-12-19 13:52:17 +06:00
あく
73ecc7cde6
Rename Irukagotchi to Dolphin. Add basic game state structures. (#268)
* Rename Irukagotchi to Dolphin. Add basic game state structures.
* Dolphin: state, counters, api. BT: shared access to flash. Flash: write api.
* add fake -1 deeds, example of changing icounter

Co-authored-by: coreglitch <mail@s3f.ru>
2020-12-19 02:15:29 +06:00
あく
153d32bf15
Power: info (#272) 2020-12-19 00:03:28 +06:00
あく
2f2f6b5f50
BLE: F3 integration (#260)
* BLE: working version
* BLE: cleanup
* BLE: update device description and DIS.
* BLE: explicitly take semaphore and configure CLK48, bt subsystem status, remove LPM.
* HAL: add missing api_hal_bt_is_alive symbol
* TODO about valuemutex
* duplicate f3-1 (f4) ioc from f3
* regenerate project
* use target dir for ble glue path
* update f4 from f3

Co-authored-by: coreglitch <mail@s3f.ru>
2020-12-10 17:25:20 +03:00
あく
3a6fbff8c3
FL-339: cli diagnostic interface for power subsystem. (#256)
* Core, API: add externs for c++
* Makefile: improve debug speed, flash with openocd, cleanup f2 config
* Power: add cli diagnostic.
* Local: fix api hal externs
* Local: fix externs in main and flipper_hal
* F2: power state dump stabs
* Bootloader flashing with openocd
* F3: move bq drivers to libs
* temporary do not build drivers on local
* temporary do not build drivers on f2

Co-authored-by: aanper <mail@s3f.ru>
2020-12-02 13:47:13 +03:00
DrZlo13
1f761d7fbb
[FL-84] iButton app, dallas emulate + cyfral read, cyfral emulate (#253)
* maxim crc function
* one wire template device and ds1990 classes
* 3 fields for addr
* cyfral emulator lib
* add cyfral read mode, refract rendering and events
* add ADC1_IN14, add adc interrupt
* cyfral read mode
* rename and move api-hal includes folder
* build onewire libs only if we build app
* start in mode 0
2020-11-25 10:25:13 +03:00