Commit Graph

28 Commits

Author SHA1 Message Date
あく
8b94eff7f9
Input: refactoring, platform agnostic key configuration.
Update input usage across project. Minor queue usage fixes and tick timings. (#330)
2021-02-10 11:56:05 +03:00
あく
523f99f154
GUI: rename widget to ViewPort. Update GUI API usage. (#317) 2021-01-29 16:52:16 +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
DrZlo13
a96f23af9b
fix multithread logic in template app, update gpio HAL (#250)
* fix multithread logic
* more buffer for dallas id string
* update apps to use new logic
* delay_us small speedup
* add consant qualifier to gpio records and some core api
* fix some apps to use simpler method of getting gpio record
* fix ibutton app, stupid stack problem
2020-11-19 15:25:32 +03:00
coreglitch
a61eef0f99
FL-186 Add vibro demo (#234)
* add vibro demo
* add F2 support
2020-11-12 22:26:49 +03:00
DrZlo13
49fdb28871
sd detect pin feature (#222)
* test sd detect pin
* sd detect support for f2 board
2020-11-11 09:17:53 +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
DrZlo13
f4d4604a03
rgb blink (#223) 2020-11-07 11:42:00 +03:00
coreglitch
eb2679b982
Refactor F2/local before F3 merge (#220)
* add files from f3
* rollback lfs
* Move assets from LFS
* remove lfs from build

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2020-11-06 11:31:59 +03:00
DrZlo13
979af6c165
Core code cleanup (#206)
* add delay function
* todo about delay_isr
* remove arduino defines and fix all apps to use core-api/hal-api
* delay for local target
* remove warnings of task_equal
* fix BSP_SD_Init
* fix USBD_static
* grio read constant pointer to gpio
* add TODO about ISR context
* const void* arg for pubsub api
* mark unused functions
* app pointers now pointed to constant apps
* fix printf format
* fix "unused" warnings in local target
* fix const pin read in local target
* fix int to pointer warnings in local target
* power read mutex error fix
* delete old makefile
* add -werror

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: aanper <mail@s3f.ru>
2020-10-29 10:58:19 +03:00
DrZlo13
8aeafd8179
furi_check - a new way to asserting (#204)
* hal-related task_is_isr_context function
* furi_check implementation
* change application to use furi_check
* add second level of assertion
* add TODO about ISR context
* Applications: refactor furi_check and furi_assert.
* Apploader: propwer widget usage. Menu: check on furi resource request.
* refactor furi_check

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: coreglitch <mail@s3f.ru>
2020-10-29 09:27:17 +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
rusdacent
7570ac08a9
Fix codestyle check pipeline (#178)
* change continue-on-error to false

* add manual trigger

* revert manual trigger

* test fail checkstyle

* restore prev trigger and settings

* fix syntax

* fix exit code for codestyle

* try to break pipeline

* restore pipeline

Co-authored-by: aanper <mail@s3f.ru>
2020-10-15 19:50:21 +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
469dbf58ac
Fix linter path and lint code (#170)
* chage syntax checker path

* fix syntax
2020-10-11 17:03:05 +06: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
DrZlo13
04bf049612
New application, QRCode generator (#160)
* Applications dependency, initial realization

* New application, qr code generator

* better buffer clearing

Co-authored-by: aanper <mail@s3f.ru>
2020-10-05 13:33:35 +03:00
DrZlo13
ec5e5da138
Applications dependency, initial realization (#159) 2020-10-05 13:17:34 +03:00
Vadim Kaushan
8c36d65e63
Input handling and debouncing (#148)
* Add input driver and definitions for target_f2

* Add input_dump example

* Invert charge input

* Fix back and left button configuration

* remove input debug

* input testing case

* move header

* lint code

Co-authored-by: aanper <mail@s3f.ru>
2020-10-02 09:44:05 +03:00
Nikita Beletskii
110a9efc3c
[WIP] Add syntax check for rust and C\C++ code (#108)
* proof of concept

* fix syntax for rust and add auto fix syntax

* fix syntax for C

* fix bug with files owner

* add information to wiki

* try to add ci

* format code from master

* even more format fixes

* change docker to docker-compose

* Exclude ./target_*/build directories from format check

* Run rustfmt only on project files

* add ulimit setup for long clang list

* merge

* fix rustfmt, exclude target Inc directory

* sync with master

* abspath

Co-authored-by: aanper <mail@s3f.ru>
Co-authored-by: Vadim Kaushan <admin@disasm.info>
2020-09-30 02:18:30 +03:00
Vadim Kaushan
cea7b2bde0 Replace fuprintf with printf in the uart_write example 2020-09-14 21:26:45 +03:00
coreglitch
5c81bb8abc
add u8g2 and ui libs (#91)
* add u8g2 and ui libs

* add display driver and usage example

* not init display in test mode

* change todo text

* fix removed code

* Target f2 (#107)

* add ioc for flipperzero f2

* add generated f1 files to f2

* regenerate cubemx

* invert initial state of led

* blink backligh

* shutdown backlight on idle
2020-09-09 19:12:09 +03:00
coreglitch
5b6ab7faf3
Example ipc (#60)
* add blank example

* add ipc example code, need to change FURI API

* add ipc example code, need to change FURI API

* change core API, add context

* check handler at take

* fix important bugs in furi

* drawing example

* add posix mq

* fix unsigned demo counter

* create at open

* working local demo

* russian version of IPC example

* english version

* add gif
2020-09-01 13:34:23 +03:00
coreglitch
4dc82b68d1
UART write example (#53)
* Rename test functions

* rewrite furi API, segfault

* make fixes in FURI, log through FURI

* add uart write example blank

* implement fuprintf instead of fopencookie

* add gif, blank page

* UART write example description

Co-authored-by: Vadim Kaushan <admin@disasm.info>
2020-08-26 21:32:22 +03:00
aanper
e28cfe5fec change mode to OD 2020-08-26 11:45:36 +03:00
coreglitch
bee159f435
led blink example
* led blink example

* restore tests

* Update FURI_and_examples.md
2020-08-26 04:56:33 +03:00