Commit Graph

50 Commits

Author SHA1 Message Date
SG
7afdd14a4c
Subghz app example (#365)
* Gui: ported submenu and view_dispatcher_remove_view from iButton branch

* App gui-test: use backported submenu api

* App subghz: initial commit

* App subghz: syntax fix

* App gui-test: fix submenu callback

* App subghz: add subfolders to build

* Gui view: c++ verison of with_view_model

* Subghz app: simple spectrum settings view

* Subghz app: add spectrum settings view to view manager

* Subghz app: spectrum settings scene

Co-authored-by: coreglitch <mail@s3f.ru>
2021-03-05 12:47:27 +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
DrZlo13
4341da90dc
Implementation of some widgets based on real use cases and designs [FL-392][FL-809] (#315)
* gui test app
* aligned string draw functions
* add canvas_invert_color, canvas_draw_button_left, canvas_draw_button_right
* use new str and button fns in dialog
* real dialog mockup
* add new gui test app recipe
* submenu module init
* delete unused variable
* move buttons to element, add canvas_string_width fn, new center button element
* button icons
* submenu module
* use submenu module, switch views
* keyboard buttons img
* new font for keyboard
* text input (keyboard) module
* add text input to gui test app
* add gui tesst app to release build, fix flags
* handle transition from start and end position, fix input switch
* add long text support to text input
* canvas_string_width and the underlying u8g2_GetStrWidth now return uint16_t
* remove deprecated libs and apps
* canvas_font_max_height fn
* new element, aligned multiline text
* use multiline text instead of plain string
* fix second keyboard row, rename uppercase fn
* qwerty-like keyboard layout
* new icons for iButton app
* better dialog text position and events handling
* remove confusing comment
* new extended dialog module
* extended dialog module usage
* update docs
* new gui module, popup with timeout
* popup usage
* canvas, remove outdated canvas_font_max_height, use canvas_current_font_height
* use furi check
* use new view_enter and view_exit callback for timers
* add DrZlo to gui tester codeowner

Co-authored-by: aanper <mail@s3f.ru>
2021-02-05 02:35:06 +03:00
DrZlo13
cf1c8fb223
[FL-85][FL-446][FL-720] Dallas key blanks and OneWire lib rework (#313)
* sepate one wire class
* TM2004 writer
* app mode write ds1990
* test another blanks protocol
* new ibutton slave
* one wire states
* tim1 capture compare and update interrupts
* interrupt mgr, new timers IRQ
* discard HAL_TIM_PeriodElapsedCallback from main
* add exti_14 line
* add external interrupt callback
* use int mgr in input
* better interrupt managment
* add interrupt callback enable and disable fns
* properly init app
* changed timings
* rename one wire classes
* use new owb classes
* properly remove interrupts
* new blanks writer
* remove unused tests
* new core includes
* extern c guard
* fix api_interrupt_remove usage
* remove debug info, new way to detect blanks writing
* remove copy constructor
* change keys template
* fix app sources recipe
2021-01-28 15:30:31 +03:00
あく
d0ed33e710
GUI module example: 2 button dialog (#308)
* GUI: reusable module example
2021-01-20 19:51:01 +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
DrZlo13
f94633863c
[FL-520] Filesystem Api and App (#280)
* update fatfs integer types
* fix sector size to 512
* fix sector size calculation
* common fs api
* fs api realization (sd card + fat fs)
* better sector size definition
* more api realization fns
* add error description api, add common api
* fix api flag naming, run app
* add fs_info call
* disable fatfs strfuncs, enable fatfs chmod
* rework filesystem app
* sd detect cycle, sd menu, sd eject feature
* fix sd detect cycle
* sd card format routine
* ui improvements, sd info routine
* properly unmount card
* separate mode flags
* add api folder, move app, rename app
* fix api naming
* update st-card-test to use api
* update path to app
* fixed potential problem of using sizeof union
* updated api documentation, new time/date fns
* update codeowners
* changed app requirements
* changed app order
* sd insert/remove log
2021-01-11 20:52:35 +06:00
DrZlo13
d65e9b04ce
[FL-572][FL-577] Irda receive feature (#282)
* fix "state not acquired error"
* add InterruptTypeComparatorTrigger to interrupt mgr, use interrupt mgr in irda app
* separate init irda timer
* capture events buffer by app
* irda common decoder
* irda nec decoder realization
* finished work with decoder
* fix app path
* fix widget remove on exit
* nec receive, store and send
* init some packets
2021-01-07 22:28:35 +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
あく
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
coreglitch
f58b322bb5
FL-353 Cc1101 rx (#255)
* enable transparent mode
* rssi ok, transmit ok, fifo ok
* I see the signal
* successful async rx (registers from smartrf)
* refactor rfstudio register config
* rewrite config, found some issues
* handle G0 interrupts
* g0 irq enable after cc1101 init
* update cube
2020-12-01 21:47:46 +03:00
DrZlo13
27ae2a8fa9
#FL-303 fix for some spi bugs, test app for sd-nfc interconnection (#247)
* sd-nfc test app

* do not hold spi in disable mode

* disable pullups in nfc chip
2020-11-18 16:01:25 +03:00
coreglitch
6d7ecf9a44
Floopper bloopper (#245)
* add floopper bloopper build
* enhance canvas api
* update submodule
2020-11-18 11:01:51 +03:00
DrZlo13
799eefd754 ibutton app, only read mode 2020-11-17 07:10:58 +10:00
DrZlo13
3d6af91dd1
simple music player app (#240)
* split power-cli dependence
* music_player application
* add player to release mode
* fix stupid error
2020-11-16 20:12:05 +03:00
あく
3749eb0eed
USB VCP Cli (#237)
* Core: ring buffer.
* Api: usb vcp. F3: vcp glue code.
* Applications: cli draft version.
* Cli: basic working version, includes help and version commands
* HAL: vcp on f2
* Makefile: update openocd conf
* F3: vcp rx with freertos stream
* Cli: help
* Cli: standard commands, api-hal-uid
* Power: cli poweroff.
2020-11-16 13:16:34 +03:00
DrZlo13
714d732745
FL-78 Microsd test application (#230)
* variable cluster size, label info functions for targets
* app record
* init, mount, get label, get sn, get space
* enable exfat
* more stack for the stack god
* remove c app and add cpp app
* remove MULTI_PARTITION
* fix 4gb bug
* update app to new template lib, add animated waiting
* tiny buffer configuration
* write speed benchmark
* fnv1a hash library
* make DEFAULT_STACK_SIZE and MAX_TASK_COUNT defined per target
* fully functional sd card app
* build sd test app to release firmware
* cpp, not c
* light up red led if error
* flags for c++
* linking with g++
* suppres snprintf warning
* move format work area to heap

Co-authored-by: coreglitch <mail@s3f.ru>
2020-11-14 19:24:38 +03:00
coreglitch
afcfcd4d4a
FL-103 Gpio test (#236)
* fail build
* add gpio tester
2020-11-14 13:08:07 +03:00
coreglitch
a61eef0f99
FL-186 Add vibro demo (#234)
* add vibro demo
* add F2 support
2020-11-12 22:26:49 +03:00
coreglitch
1fbfc5a61a
Blink strobe (#213)
* blink all led and control freq by button
* rename to strobe
2020-11-07 12:24:40 +03:00
あく
0af239ebc0
GUI: status bar rendering. Power: battery indicator. (#207)
* Menu: animation. Irukagotchi: idle image.
* Power: battery, usb activity widget
* Power: tune battery max voltage and clamp overshoot
* get initial charge state

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: aanper <mail@s3f.ru>
2020-10-29 10:11:16 +03:00
あく
665f6d7d9c
Assets, Icons, UI toolkit. Part 1. (#202)
* Assets: import from gdrive
* Assets: fully working build pipeline and registry
* NFC: menu icon
* Gui: layers. Irukagotchi: base app to handle input on idle screen. Makefile: reboot after flash in dfu mode.
* ValueMutex: with lambda
* Assets: proper animation frames sorting
* ValueMutex: proper furi_open usage
* Assets,GUI: split icon into icon data and icon state.
* Format source code
* Docker: add python3 and imagemagic
* Irukagotchi: cleanup
* GUI: event lock moved to gui.
* Rfid: proper gui layer
* GUI: elements. Menu: frame and scroll
* GUI, Menu: format code.
* Menu: dual font main menu
* Menu: format sources
* GUI: 0 total scrollbar
* CI: enable lfs
* Menu: pixel perfect main menu

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: aanper <mail@s3f.ru>
2020-10-26 20:00:17 +03:00
coreglitch
e699c4a31e
Lf rfid (#196)
* add lf rfid workaround
* add pwmn
* carrier generator
* proper exit for lf rfid

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2020-10-26 12:56:46 +03:00
Vadim Kaushan
bb68fca20b
Implement ValueManager and ValueComposer (#183)
* Fix ValueManager implementation
* Implement ValueComposer
* Add constructor for ValueManager
* Add value-expanders.h to flipper_v2.h set
* Move COPY_COMPOSE body into a .c file
* Add test for ValueManager
* Add destructors for ValueMutex, ValueManager and ValueComposer
* Use destructors in tests
* Move composition logic into perform_compose()
* Add docs for perform_compose()
* Add test for ValueComposer
* Replace atomic_bool with bool as g++ compiler doesn't support C11 atomics
* Add Event type
* Add semaphore support to the local target
* Add test for Event
* Update input records and relevant examples
* Rename Event to AppEvent in the cc1101-workaround example
* Rename Event to AppEvent in the irda example
* Use Event in ValueComposer to wait for update request
* Add perform_compose_internal() function
* fix Event/AppEvent

Co-authored-by: aanper <mail@s3f.ru>
2020-10-26 12:26:15 +03:00
coreglitch
f5b342abbe
Api hw gpio pwm (#199)
* initial gpio layer

* move temlplate.c to template.c.example in preparing to applications.mk rework

* separate arduino layer

* separate flipper_hal.x

* prepare to switch applications on v2 core gpio api

* swithch applications to v2 gpio api

* gpio api for local target

* better gpio_disable handling

* remove pwm functions from local target

* inline gpio funcs

* common function to init all api's

* fix local example blink

* move delay us to hal api folder

* move pwm_set/pwm_stop to hal api folder

* update applications to use hal pwm api

* remove gpio mode case warning

* add speaker demo to build

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2020-10-26 10:16:54 +03:00
DrZlo13
37fc47a24f
IR transmit example (#180)
* DWT-based microsecond delay

* simple ir app (work only with NEC protocol and predefined address - command)

* remove space from file name, add delay_us_init_DWT header

* float-based delay us

* init tim2 by CubeMX

* fix simple pwm functions

* simple pwm timer based ir nec protocol

* ir gui test app

Co-authored-by: aanper <mail@s3f.ru>
2020-10-23 12:39:11 +03:00
Aleksandr Kutuzov
4c60218997 NFC: proper include order in Makefile 2020-10-20 15:25:01 +03:00
Aleksandr Kutuzov
88ab3c3aee NFS: export config var 2020-10-20 15:02:00 +03:00
Aleksandr Kutuzov
4c9eb4928d NFC: application + rfal + driver. 2020-10-20 14:12:28 +03:00
aanper
3da3022dff fix build flag 2020-10-20 08:45:38 +03:00
aanper
dc39be505b not build cc1101 in local build, app_release default in CI build 2020-10-19 09:56:12 +03:00
aanper
3b993578f4 release/cc1101 debug build 2020-10-19 09:22:38 +03:00
aanper
737ee2b0bf gui, navigate over freqs 2020-10-18 07:10:15 +03:00
aanper
568143537d build ok, issue with display 2020-10-18 05:52:11 +03:00
aanper
7c03ce179c add cc1101 to build/menu 2020-10-18 05:43:09 +03:00
aanper
05d704fd54 merge 2020-10-17 16:48:13 +03:00
aanper
b9fbf78616 sandbox gui 2020-10-17 12:58:14 +03:00
aanper
566ba378ff add apploader example 2020-10-17 11:48:52 +03:00
aanper
a9a39fcda9 merge from master, menu not work 2020-10-16 07:42:08 +03:00
DrZlo13
05ef19b07a
Pubsub core api feature (#174)
* fixed inline functions for modern C standart

* pubsub api, base version

* basic test for pubsub

* update applications.mk, add test file

* more test for pubsub

* remove unimplemented files, cleanup header file

* remove legacy tests, check unsubscribe not call cb

* implement deleting mutex, fail test

* release mutex before deleting

Co-authored-by: aanper <mail@s3f.ru>
2020-10-15 21:23:18 +03:00
DrZlo13
59740349fa
furi memory managment (#177)
* memory managment calls now forwarded to freertos heap

* memory managment tests

* local target test compability

* rename heap.c file to heap_4.c for local target and explicity init heap in single thread context

* rebase BlockLink_t struct

* check mutex in local heap

Co-authored-by: aanper <mail@s3f.ru>
2020-10-15 20:36:15 +03:00
aanper
1e40f873a5 backlight control 2020-10-15 19:15:53 +03:00
aanper
f0f3615c55 compile/run ok, issue with backlight 2020-10-15 18:56:47 +03:00
coreglitch
b2a12d091a
Display and UI implementation (#169)
* Menu app. Lib: add mlib submodule.

* Menu: new startup lib dependency definition

* Menu: hierarchy in menu. Cube: fix heap1/4 inconsistency, stack protection.

* GUI: rendering pipeline initial version.

* GUI: layered widget composing, FURI record. Menu: FURI record, api.

* GUI: input dispatching. Menu: switch to input from GUI.

* GUI, MENU: code style cleanup, fix type conversion warnings.

* GUI, Menu: syntax check.

* Makefile: check and reinit submodules, format.

* Menu: lock on event processing. Makefile: proper submodule initialization.

* Menu: fix stack corruption by queue.

* GUI: refactor.

* Makefile: format rule fix, st-util pid.

* GUI, Menu, FURI: format with clang-format.

* GUI, MENU: locks in critical sections, fix stack corruption, ready signaling.

* Makefile: clang format rule cleanup.

* GUI,MENU: migrate to new API.

* Applications: PRODUCTION_HW variable, skip drivers build on local target.

* refactor production build

* add git to dockerfile

* GUI: uncomment lock block

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
2020-10-14 13:21:55 +03:00
aanper
3020a2a6b9 wip cc1101 work 2020-10-14 10:26:23 +03:00
aanper
f696673700 add workaround app 2020-10-13 13:39:59 +03:00
coreglitch
942bbfaefe
Core api concept (#144)
* add input debounce code from old fw

* exampl of input api

* change input API to get/release

* revert input API to read

* pointer instead of instance

* add input API description

* add display API

* rewrite display names

* migrate to valuemanager

* add LED API

* add closing brakets

* add sound api

* fix led api

* basic api

* rename API pages

* change pubsub implementation

* move FURI AC -> flapp, add valuemutex example, add valuemanager implementation

* pubsub usage example

* user led example

* update example

* simplify input

* add composed display

* add SPI/GPIO and CC1101 bus

* change cc1101 api

* spi api and devices

* spi api and devices

* move SPI to page, add GPIO

* not block pin open

* backlight API and more

* add minunit tests

* fix logging

* ignore unexisting time service on embedded targets

* fix warning, issue with printf

* Deprecate furi_open and furi_close (#167)

Rename existing furi_open and furi_close to deprecated version

* add exitcode

* migrate to printf

* indicate test by leds

* add testing description

* rename furi.h

* wip basic api

* add valuemutex, pubsub, split files

* add value expanders

* value mutex realization and tests

* valuemutex test added to makefile

* do not build unimplemented files

* fix build furmware target f2

* redesigned minunit tests to allow testing in separate files

* test file for valuemutex minunit testing

* minunit partial test valuemutex

* local cmsis_os2 mutex bindings

* implement furi open/create, tests

* migrate concurrent_access to ValueMutex

* add spi header

* Lib: add mlib submodule.

Co-authored-by: rusdacent <rusdacentx0x08@gmail.com>
Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2020-10-13 11:22:43 +03:00
coreglitch
176e608c6d
Add minunit test framework (#168)
* add minunit tests

* fix logging

* ignore unexisting time service on embedded targets

* fix warning, issue with printf

* add exitcode

* migrate to printf

* indicate test by leds

* add testing description

* redesigned minunit tests to allow testing in separate files

* add test step for local target

* add failure test

* add restore test_check

* testing description

Co-authored-by: rusdacent <rusdacentx0x08@gmail.com>
Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
2020-10-10 13:32:06 +03:00
DrZlo13
59513b05ee
Simple sd card driver (#162)
* fixed inline functions for modern C standart

* more stack for application

* added library

* init fatfs library

* fatfs example application

* Merge with current master

* fix typo and delete old files

* cmsis os 2 reentrance fix

* Reworked dependency wait to support multiple dependency

* Build FatFS on local target, syscall.c is target-specific.

* run local target ok

* testcase for fatfs

Co-authored-by: aanper <mail@s3f.ru>
2020-10-08 17:37:19 +03:00
あく
3c2711102c
Target refactoring and cube update (#161)
* Lib: move cube to libs. Firmware: prepare for code base refactoring, detach from cube, port to cmsis_os2.

* Firmware, target f2: regenerate project with latest cube package, tim17 for os ticks.

* Firmware: unified codebase.

* Core: do not include semaphore on old targets. Firmware: dfu uplaod target.

* CI: submodules, add firmware build.

* CI: proper submodule config.

* refactor build system

* CI: update chain to use new targets. Documentation: update to match current structure.

* CI: clean before rebuild.

* Add local test

docker-compose exec dev make -C firmware TARGET=local TEST=1 run

* Makefile: target specific build directory. CI: updated artifacts path.

* Makefile: init git submodules if they don't exists.

* Makefile: debug rule now doesn't reset MCU, prevent SIGINT propagation to st-util.

* Makefile: proper rebuild sequence in zz and zzz

* Makefile: timestamp tracking for flash and upload commands.

* Apps: modular build. Input: fix flipper hal inline.

* Wiki: proper bootloader link.

* Applications: fix broken build for local targets.

* add st-flash to docker

* fix build

* force rebuild app

* move app force to firmware part

* fix build deps

* qrcode build ok

* fix example display

* add testing routine

* update build instruction

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: aanper <mail@s3f.ru>
2020-10-07 12:37:43 +03:00