Naming and coding style convention, new linter tool. (#945)

* Makefile, Scripts: new linter
* About: remove ID from IC
* Firmware: remove double define for DIVC/DIVR
* Scripts: check folder names too. Docker: replace syntax check with make lint.
* Reformat Sources and Migrate to new file naming convention
* Docker: symlink clang-format-12 to clang-format
* Add coding style guide
This commit is contained in:
あく 2022-01-05 19:10:18 +03:00 committed by GitHub
parent c98e54da10
commit 389ff92cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
899 changed files with 379245 additions and 373421 deletions

View File

@ -47,7 +47,7 @@ jobs:
id: syntax_check
uses: ./.github/actions/docker
with:
run: SET_GH_OUTPUT=1 /syntax_check.sh
run: SET_GH_OUTPUT=1 make lint
- name: Report code formatting errors
if: failure() && steps.syntax_check.outputs.errors && github.event.pull_request
@ -59,4 +59,4 @@ jobs:
```
${{ steps.syntax_check.outputs.errors }}
```
You might want to run `docker compose exec dev /syntax_check.sh` for an auto-fix.
You might want to run `docker compose exec dev make format` for an auto-fix.

101
CODING_STYLE.md Normal file
View File

@ -0,0 +1,101 @@
# Intro
Nice to see you reading this document, we really appreciate it.
As all documents of this kind it's unable to cover everything.
But it will cover general rules that we enforcing on PR review.
Also we already have automatic rules checking and formatting,
but it got it's limitations and this guide is still mandatory.
Some part of this project do have it's own naming and coding guides.
For example: assets. Take a look into `ReadMe.md` in assets folder for more details.
Also 3rd party libraries are none of our concern.
And yes, this set is not final and we are open to discussion.
If you want to add/remove/change something here please feel free to open new ticket.
# Inspiration
Our guide is inspired by, but not claiming to be compatible with:
- https://www.kernel.org/doc/html/v4.10/process/coding-style.html
- https://docs.unrealengine.com/en-US/Programming/Development/CodingStandard
- https://webkit.org/code-style-guidelines/
# General rules
## Readability and Simplicity first
Code we write is intended to be public.
Avoid one-liners from hell and keep code complexity under control.
Try to make code self explanatory and add comments if needed.
Leave references to standards that you are implementing.
Use project wiki to document new/reverse engineered standards.
## Variable and function names must clearly define what it's doing
It's ok if it will be long, but it should clearly state what it's doing, without need to dive into code.
This also applies to function/method's code.
Try to avoid one letter variables.
## Encapsulation
Don't expose raw data, provide methods to work with it.
Almost everything in flipper firmware is built around this concept.
# C coding style
- Tab is 4 spaces
- Use `make format` to reformat source code and check style guide before commit
## Naming
### Type names are CamelCase
Examples:
FuriHalUsb
Gui
SubghzKeystore
### Functions are snake_case
furi_hal_usb_init
gui_add_view_port
subghz_keystore_read
### File and Package name is a prefix for it's content
This rule makes easier to locate types, functions and sources.
For example:
We have abstraction that we call `Subghz Keystore`, so there will be:
file `subghz_keystore.h` we have type `SubghzKeystore` and function `subghz_keystore_read`.
### File names
- Directories: `^[0-9A-Za-z_]+$`
- File names: `^[0-9A-Za-z_]+\.[a-z]+$`
- File extensions: `[ ".h", ".c", ".cpp", ".cxx", ".hpp" ]`
Enforced by linter.
### Standard function/method names
Suffixes:
- `alloc` - allocate and init instance. C style constructor. Returns pointer to instance.
- `free` - deinit and release instance. C style destructor. Takes pointer to instance.
# C++ coding style
Work In Progress. Use C style guide as a base.
# Python coding style
- Tab is 4 spaces
- Use [black](https://pypi.org/project/black/) to reformat source code before commit

View File

@ -21,6 +21,7 @@ Before writing code and creating PR make sure that it aligns with our mission an
- All our devices are intended for research and education.
- PR that contains code intended to commit crimes is not going to be accepted.
- Your PR must comply with our [Coding Style](CODING_STYLE.md)
- Your PR must contain code compatiable with project [LICENSE](LICENSE).
- PR will only be merged if it pass CI/CD.
- PR will only be merged if it pass review by code owner.

View File

@ -1,7 +1,28 @@
PROJECT_ROOT := $(abspath $(dir $(abspath $(firstword $(MAKEFILE_LIST)))))
COPRO_DIR := $(PROJECT_ROOT)/lib/STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x
NPROCS := 1
PROJECT_SOURCE_DIRECTORIES := \
$(PROJECT_ROOT)/applications \
$(PROJECT_ROOT)/bootloader/src \
$(PROJECT_ROOT)/bootloader/targets \
$(PROJECT_ROOT)/core \
$(PROJECT_ROOT)/firmware/targets \
$(PROJECT_ROOT)/lib/app-template \
$(PROJECT_ROOT)/lib/app-scened-template \
$(PROJECT_ROOT)/lib/common-api \
$(PROJECT_ROOT)/lib/cyfral \
$(PROJECT_ROOT)/lib/drivers \
$(PROJECT_ROOT)/lib/flipper_file \
$(PROJECT_ROOT)/lib/irda \
$(PROJECT_ROOT)/lib/nfc_protocols \
$(PROJECT_ROOT)/lib/ST25RFAL002 \
$(PROJECT_ROOT)/lib/onewire \
$(PROJECT_ROOT)/lib/qrcode \
$(PROJECT_ROOT)/lib/subghz \
$(PROJECT_ROOT)/lib/toolbox \
$(PROJECT_ROOT)/lib/u8g2
NPROCS := 3
OS := $(shell uname -s)
ifeq ($(OS), Linux)
@ -91,10 +112,12 @@ flash_radio_fus_please_i_m_not_going_to_complain:
@$(PROJECT_ROOT)/scripts/flash.py core2fus 0x080EC000 --statement=AGREE_TO_LOOSE_FLIPPER_FEATURES_THAT_USES_CRYPTO_ENCLAVE $(COPRO_DIR)/stm32wb5x_FUS_fw.bin
@$(PROJECT_ROOT)/scripts/ob.py set
FORMAT_SOURCES = $(shell find applications bootloader core -iname "*.h" -o -iname "*.c" -o -iname "*.cpp")
.PHONY: lint
lint:
@echo "Checking source code formatting"
@$(PROJECT_ROOT)/scripts/lint.py check $(PROJECT_SOURCE_DIRECTORIES)
.PHONY: format
format:
@echo "Formatting sources with clang-format"
@clang-format -style=file -i $(FORMAT_SOURCES)
@echo "Reformating sources code"
@$(PROJECT_ROOT)/scripts/lint.py format $(PROJECT_SOURCE_DIRECTORIES)

View File

@ -11,7 +11,6 @@ Our goal is to create nice and clean code with good documentation, to make it a
[Get Latest Firmware from Update Server](https://update.flipperzero.one/)
Flipper Zero's firmware consists of three components:
- Core2 firmware set - proprietary components by ST: FUS + radio stack. FUS is flashed at factory and you should never update it.
@ -135,6 +134,7 @@ make whole
```
# Links
* Discord: [flipp.dev/discord](https://flipp.dev/discord)
* Website: [flipperzero.one](https://flipperzero.one)
* Kickstarter page: [kickstarter.com](https://www.kickstarter.com/projects/flipper-devices/flipper-zero-tamagochi-for-hackers)

View File

@ -4,7 +4,7 @@
#include <gui/view_dispatcher.h>
#include <gui/modules/empty_screen.h>
#include <m-string.h>
#include <furi-hal-version.h>
#include <furi_hal_version.h>
typedef DialogMessageButton (*AboutDialogScreen)(DialogsApp* dialogs, DialogMessage* message);
@ -14,7 +14,7 @@ static DialogMessageButton product_screen(DialogsApp* dialogs, DialogMessage* me
const char* screen_header = "Product: Flipper Zero\n"
"Model: FZ.1\n";
const char* screen_text = "FCC ID: 2A2V6-FZ\n"
"IC ID: 27624-FZ";
"IC: 27624-FZ";
dialog_message_set_header(message, screen_header, 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, screen_text, 0, 26, AlignLeft, AlignTop);
@ -222,4 +222,4 @@ int32_t about_settings_app(void* p) {
furi_record_close("gui");
return 0;
}
}

View File

@ -1,4 +1,4 @@
#include "accessor-app.h"
#include "accessor_app.h"
// app enter function
extern "C" int32_t accessor_app(void* p) {

View File

@ -1,6 +1,6 @@
#include "accessor-app.h"
#include "accessor_app.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <stdarg.h>
void AccessorApp::run(void) {

View File

@ -1,15 +1,15 @@
#pragma once
#include <map>
#include <list>
#include "accessor-view-manager.h"
#include "accessor_view_manager.h"
#include "scene/accessor-scene-start.h"
#include "scene/accessor_scene_start.h"
#include "helpers/wiegand.h"
#include <one_wire_master.h>
#include <notification/notification-messages.h>
#include <notification/notification_messages.h>
class AccessorApp {
public:

View File

@ -1,5 +1,5 @@
#include "accessor-view-manager.h"
#include "accessor-event.h"
#include "accessor_view_manager.h"
#include "accessor_event.h"
#include <callback-connector.h>
AccessorAppViewManager::AccessorAppViewManager() {

View File

@ -3,7 +3,7 @@
#include <gui/view_dispatcher.h>
#include <gui/modules/submenu.h>
#include <gui/modules/popup.h>
#include "accessor-event.h"
#include "accessor_event.h"
class AccessorAppViewManager {
public:

View File

@ -1,6 +1,6 @@
#include "wiegand.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
volatile unsigned long WIEGAND::_cardTempHigh = 0;
volatile unsigned long WIEGAND::_cardTemp = 0;

View File

@ -1,5 +1,5 @@
#pragma once
#include "../accessor-app.h"
#include "../accessor_app.h"
class AccessorApp;

View File

@ -1,8 +1,8 @@
#include "../accessor-app.h"
#include "../accessor-view-manager.h"
#include "../accessor-event.h"
#include "../accessor_app.h"
#include "../accessor_view_manager.h"
#include "../accessor_event.h"
#include <callback-connector.h>
#include "accessor-scene-start.h"
#include "accessor_scene_start.h"
void AccessorSceneStart::on_enter(AccessorApp* app) {
AccessorAppViewManager* view_manager = app->get_view_manager();

View File

@ -1,5 +1,5 @@
#pragma once
#include "accessor-scene-generic.h"
#include "accessor_scene_generic.h"
class AccessorSceneStart : public AccessorScene {
public:

View File

@ -1,5 +1,5 @@
#pragma once
#include "file-worker.h"
#include "file_worker.h"
#define ARCHIVE_FAV_PATH "/any/favorites.txt"
#define ARCHIVE_FAV_TEMP_PATH "/any/favorites.tmp"

View File

@ -1,5 +1,5 @@
#pragma once
#include "file-worker.h"
#include "file_worker.h"
#define MAX_FILES 100 //temp

View File

@ -1,6 +1,6 @@
#include "bad_usb_app_i.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
static bool bad_usb_app_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);

View File

@ -9,8 +9,8 @@
#include <gui/scene_manager.h>
#include <gui/modules/submenu.h>
#include <dialogs/dialogs.h>
#include <notification/notification-messages.h>
#include <gui/modules/variable-item-list.h>
#include <notification/notification_messages.h>
#include <gui/modules/variable_item_list.h>
#include "views/bad_usb_view.h"
#define BAD_USB_APP_PATH_FOLDER "/any/badusb"

View File

@ -1,9 +1,9 @@
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <input/input.h>
#include <lib/toolbox/args.h>
#include <furi-hal-usb-hid.h>
#include <furi_hal_usb_hid.h>
#include <storage/storage.h>
#include "bad_usb_script.h"

View File

@ -1,5 +1,5 @@
#include "../bad_usb_app_i.h"
#include "furi-hal-power.h"
#include "furi_hal_power.h"
static bool bad_usb_file_select(BadUsbApp* bad_usb) {
furi_assert(bad_usb);

View File

@ -1,7 +1,7 @@
#include "../bad_usb_script.h"
#include "../bad_usb_app_i.h"
#include "../views/bad_usb_view.h"
#include "furi-hal.h"
#include "furi_hal.h"
void bad_usb_scene_work_ok_callback(InputType type, void* context) {
furi_assert(context);

View File

@ -1,5 +1,5 @@
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <applications/cli/cli.h>
#include <lib/toolbox/args.h>

View File

@ -1,5 +1,5 @@
#include "bt_debug_app.h"
#include <furi-hal-bt.h>
#include <furi_hal_bt.h>
#define TAG "BtDebugApp"

View File

@ -1,7 +1,7 @@
#include "bt_carrier_test.h"
#include "bt_test.h"
#include "bt_test_types.h"
#include "furi-hal-bt.h"
#include "furi_hal_bt.h"
struct BtCarrierTest {
BtTest* bt_test;

View File

@ -1,7 +1,7 @@
#include "bt_packet_test.h"
#include "bt_test.h"
#include "bt_test_types.h"
#include "furi-hal-bt.h"
#include "furi_hal_bt.h"
struct BtPacketTest {
BtTest* bt_test;

View File

@ -1,6 +1,6 @@
#include "bt_hid.h"
#include <furi-hal-bt.h>
#include <applications/notification/notification-messages.h>
#include <furi_hal_bt.h>
#include <applications/notification/notification_messages.h>
#define TAG "BtHidApp"

View File

@ -1,7 +1,7 @@
#include "bt_hid_keynote.h"
#include <furi.h>
#include <furi-hal-bt-hid.h>
#include <furi-hal-usb-hid.h>
#include <furi_hal_bt_hid.h>
#include <furi_hal_usb_hid.h>
#include <gui/elements.h>
struct BtHidKeynote {

View File

@ -1,7 +1,7 @@
#include "bt_hid_media.h"
#include <furi.h>
#include <furi-hal-bt-hid.h>
#include <furi-hal-usb-hid.h>
#include <furi_hal_bt_hid.h>
#include <furi_hal_usb_hid.h>
#include <gui/elements.h>
struct BtHidMedia {

View File

@ -2,7 +2,7 @@
#include "battery_service.h"
#include "bt_keys_storage.h"
#include <applications/notification/notification-messages.h>
#include <applications/notification/notification_messages.h>
#define TAG "BtSrv"

View File

@ -3,7 +3,7 @@
#include "bt.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <gui/view_port.h>

View File

@ -1,6 +1,6 @@
#include "bt_keys_storage.h"
#include <furi.h>
#include <file-worker.h>
#include <file_worker.h>
#define BT_KEYS_STORAGE_TAG "bt keys storage"
#define BT_KEYS_STORAGE_PATH "/int/bt.keys"

View File

@ -1,6 +1,6 @@
#include "bt_settings.h"
#include <furi.h>
#include <file-worker.h>
#include <file_worker.h>
#define TAG "BtSettings"
#define BT_SETTINGS_PATH "/int/bt.settings"

View File

@ -6,7 +6,7 @@
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/variable-item-list.h>
#include <gui/modules/variable_item_list.h>
#include "../bt_settings.h"
#include "scenes/bt_settings_scene.h"

View File

@ -1,5 +1,5 @@
#include "../bt_settings_app.h"
#include "furi-hal-bt.h"
#include "furi_hal_bt.h"
enum BtSetting {
BtSettingOff,

View File

@ -1,7 +1,7 @@
#include "cli_i.h"
#include "cli_commands.h"
#include <furi-hal-version.h>
#include <furi_hal_version.h>
#include <loader/loader.h>
Cli* cli_alloc() {

View File

@ -1,10 +1,10 @@
#include "cli_commands.h"
#include <furi-hal.h>
#include <furi-hal-gpio.h>
#include <furi-hal-info.h>
#include <task-control-block.h>
#include <furi_hal.h>
#include <furi_hal_gpio.h>
#include <furi_hal_info.h>
#include <task_control_block.h>
#include <time.h>
#include <notification/notification-messages.h>
#include <notification/notification_messages.h>
// Close to ISO, `date +'%Y-%m-%d %H:%M:%S %u'`
#define CLI_DATE_FORMAT "%.4d-%.2d-%.2d %.2d:%.2d:%.2d %d"

View File

@ -3,7 +3,7 @@
#include "cli.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <m-dict.h>
#include <m-bptree.h>

View File

@ -1,4 +1,4 @@
#include <furi-hal.h>
#include <furi_hal.h>
#include <furi.h>
#include <lib/toolbox/args.h>

View File

@ -1,10 +1,10 @@
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <input/input.h>
#include <notification/notification-messages.h>
#include <notification/notification_messages.h>
#define BLINK_COLOR_COUNT 7

View File

@ -1,6 +1,6 @@
#include "display_test.h"
#include <furi-hal.h>
#include <furi_hal.h>
#include <furi.h>
// Need access to u8g2
@ -10,7 +10,7 @@
#include <gui/view_dispatcher.h>
#include <gui/modules/submenu.h>
#include <gui/modules/variable-item-list.h>
#include <gui/modules/variable_item_list.h>
#include "view_display_test.h"

View File

@ -2,11 +2,11 @@
#include <m-string.h>
#include <gui/gui.h>
#include <notification/notification.h>
#include <notification/notification-messages.h>
#include <notification/notification_messages.h>
#include <gui/elements.h>
#include <stream_buffer.h>
#include <furi-hal-uart.h>
#include <furi-hal-console.h>
#include <furi_hal_uart.h>
#include <furi_hal_console.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/dialog_ex.h>

View File

@ -1,5 +1,5 @@
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <input/input.h>

View File

@ -1,5 +1,5 @@
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <gui/view.h>
#include <gui/view_dispatcher.h>

View File

@ -1,9 +1,9 @@
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <input/input.h>
#include <notification/notification-messages.h>
#include <notification/notification_messages.h>
void vibro_test_draw_callback(Canvas* canvas, void* ctx) {
canvas_clear(canvas);

View File

@ -1,5 +1,5 @@
#include "animation_manager.h"
#include "furi-hal-delay.h"
#include "furi_hal_delay.h"
#include "portmacro.h"
#include "views/bubble_animation_view.h"
#include "animation_storage.h"
@ -14,7 +14,7 @@
#include <stdint.h>
#include <storage/storage.h>
#include <dolphin/dolphin_i.h>
#include <storage/filesystem-api-defines.h>
#include <storage/filesystem_api_defines.h>
#define TAG "AnimationManager"

View File

@ -1,5 +1,5 @@
#include "animation_manager.h"
#include "file-worker.h"
#include "file_worker.h"
#include "flipper_file.h"
#include "furi/common_defines.h"
#include "furi/memmgr.h"
@ -9,7 +9,7 @@
#include "m-string.h"
#include "pb.h"
#include "pb_decode.h"
#include "storage/filesystem-api-defines.h"
#include "storage/filesystem_api_defines.h"
#include "storage/storage.h"
#include "animation_storage_i.h"
#include <stdint.h>

View File

@ -2,8 +2,8 @@
#include "cmsis_os2.h"
#include "../animation_manager.h"
#include "../animation_storage.h"
#include "furi-hal-delay.h"
#include "furi-hal-resources.h"
#include "furi_hal_delay.h"
#include "furi_hal_resources.h"
#include "furi/check.h"
#include "furi/memmgr.h"
#include "gui/canvas.h"

View File

@ -7,7 +7,7 @@
#include <furi/pubsub.h>
#include <furi/record.h>
#include "portmacro.h"
#include "storage/filesystem-api-defines.h"
#include "storage/filesystem_api_defines.h"
#include "storage/storage.h"
#include <stdint.h>
#include <power/power_service/power.h>

View File

@ -6,7 +6,7 @@
#include "animations/animation_manager.h"
#include "gui/view_composed.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <gui/view_dispatcher.h>

View File

@ -1,5 +1,5 @@
#include "../desktop_i.h"
#include <furi-hal-version.h>
#include <furi_hal_version.h>
#define HW_MISMATCH_BACK_EVENT (0UL)

View File

@ -9,7 +9,7 @@
#include "furi/pubsub.h"
#include "furi/record.h"
#include "furi/thread.h"
#include "storage/storage-glue.h"
#include "storage/storage_glue.h"
#include <loader/loader.h>
#include <m-list.h>
#define MAIN_VIEW_DEFAULT (0UL)

View File

@ -1,7 +1,7 @@
#include "dialogs-i.h"
#include "dialogs-api-lock.h"
#include "dialogs-module-file-select.h"
#include "dialogs-module-message.h"
#include "dialogs_i.h"
#include "dialogs_api_lock.h"
#include "dialogs_module_file_select.h"
#include "dialogs_module_message.h"
static DialogsApp* dialogs_app_alloc() {
DialogsApp* app = malloc(sizeof(DialogsApp));

View File

@ -1,5 +1,5 @@
#include "dialogs-i.h"
#include "dialogs-api-lock.h"
#include "dialogs_i.h"
#include "dialogs_api_lock.h"
/****************** File select ******************/

View File

@ -1,7 +1,7 @@
#pragma once
#include "dialogs.h"
#include "dialogs-message.h"
#include "view-holder.h"
#include "dialogs_message.h"
#include "view_holder.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,7 +1,7 @@
#pragma once
#include <furi.h>
#include "dialogs-i.h"
#include "dialogs-api-lock.h"
#include "dialogs_i.h"
#include "dialogs_api_lock.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,5 +1,5 @@
#include "dialogs-i.h"
#include "dialogs-api-lock.h"
#include "dialogs_i.h"
#include "dialogs_api_lock.h"
#include <gui/modules/file_select.h>
typedef struct {

View File

@ -1,5 +1,5 @@
#pragma once
#include "dialogs-message.h"
#include "dialogs_message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,5 +1,5 @@
#include "dialogs-i.h"
#include "dialogs-api-lock.h"
#include "dialogs_i.h"
#include "dialogs_api_lock.h"
#include <gui/modules/dialog_ex.h>
typedef struct {

View File

@ -1,5 +1,5 @@
#pragma once
#include "dialogs-message.h"
#include "dialogs_message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,4 +1,4 @@
#include "view-holder.h"
#include "view_holder.h"
#include <gui/view_i.h>
#define TAG "ViewHolder"

View File

@ -2,7 +2,7 @@
#include "furi/pubsub.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include "dolphin.h"
#include "helpers/dolphin_state.h"

View File

@ -2,7 +2,7 @@
#include <stdint.h>
#include <storage/storage.h>
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <math.h>
#include <toolbox/saved_struct.h>

View File

@ -5,7 +5,7 @@
#include "furi/record.h"
#include <furi.h>
#include <gui/gui.h>
#include <furi-hal-version.h>
#include <furi_hal_version.h>
#include "dolphin/dolphin.h"
#include "math.h"

View File

@ -1,7 +1,7 @@
#include "gpio_app_i.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
static bool gpio_app_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);

View File

@ -10,8 +10,8 @@
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/submenu.h>
#include <notification/notification-messages.h>
#include <gui/modules/variable-item-list.h>
#include <notification/notification_messages.h>
#include <gui/modules/variable_item_list.h>
#include "views/gpio_test.h"
#include "views/gpio_usb_uart.h"

View File

@ -1,6 +1,6 @@
#include "gpio_item.h"
#include <furi-hal-resources.h>
#include <furi_hal_resources.h>
typedef struct {
const char* name;

View File

@ -1,6 +1,6 @@
#pragma once
#include <furi-hal-gpio.h>
#include <furi_hal_gpio.h>
#define GPIO_ITEM_COUNT 8

View File

@ -1,5 +1,5 @@
#include "../gpio_app_i.h"
#include "furi-hal-power.h"
#include "furi_hal_power.h"
enum GpioItem {
GpioItemUsbUart,

View File

@ -1,6 +1,6 @@
#include "../usb_uart_bridge.h"
#include "../gpio_app_i.h"
#include "furi-hal.h"
#include "furi_hal.h"
typedef enum {
UsbUartLineIndexVcp,

View File

@ -1,7 +1,7 @@
#include "usb_uart_bridge.h"
#include "furi-hal.h"
#include "furi_hal.h"
#include <stream_buffer.h>
#include <furi-hal-usb-cdc_i.h>
#include <furi_hal_usb_cdc_i.h>
#include "usb_cdc.h"
#define USB_CDC_PKT_LEN CDC_DATA_SZ

View File

@ -1,6 +1,6 @@
#include "../usb_uart_bridge.h"
#include "../gpio_app_i.h"
#include "furi-hal.h"
#include "furi_hal.h"
#include <gui/elements.h>
struct GpioUsbUart {

View File

@ -3,7 +3,7 @@
#include "icon_animation_i.h"
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <u8g2_glue.h>
const CanvasFontParameters canvas_font_params[FontTotalNumber] = {

View File

@ -1,5 +1,5 @@
#include "button_panel.h"
#include "furi-hal-resources.h"
#include "furi_hal_resources.h"
#include "gui/canvas.h"
#include <m-array.h>
#include <m-i-list.h>

View File

@ -1,4 +1,4 @@
#include "variable-item-list.h"
#include "variable_item_list.h"
#include "gui/canvas.h"
#include <m-array.h>
#include <furi.h>

View File

@ -1,5 +1,5 @@
/**
* @file variable-item-list.h
* @file variable_item_list.h
* GUI: VariableItemList view module API
*/

View File

@ -1,4 +1,4 @@
#include "cyfral-decoder.h"
#include "cyfral_decoder.h"
#include <furi.h>
void CyfralDecoder::reset_state() {

View File

@ -1,4 +1,4 @@
#include "key-emulator.h"
#include "key_emulator.h"
#include <callback-connector.h>
KeyEmulator::~KeyEmulator() {

View File

@ -1,6 +1,6 @@
#pragma once
#include "pulse-sequencer.h"
#include "../ibutton-key.h"
#include "pulse_sequencer.h"
#include "../ibutton_key.h"
#include <one_wire_slave.h>
#include <one_wire_device_ds_1990.h>
#include <atomic>

View File

@ -1,5 +1,5 @@
#include "key-reader.h"
#include "key-commands.h"
#include "key_reader.h"
#include "key_commands.h"
#include <callback-connector.h>
#include <maxim_crc.h>

View File

@ -1,10 +1,10 @@
#pragma once
#include <stdint.h>
#include <furi.h>
#include "cyfral-decoder.h"
#include "cyfral_decoder.h"
#pragma once
#include "metakom-decoder.h"
#include "../ibutton-key.h"
#include "metakom_decoder.h"
#include "../ibutton_key.h"
#include <one_wire_master.h>
#include <one_wire_slave.h>

View File

@ -1,4 +1,4 @@
#include "key-worker.h"
#include "key_worker.h"
#include <callback-connector.h>
#include <maxim_crc.h>

View File

@ -1,10 +1,10 @@
#pragma once
#include <furi.h>
#include "key-info.h"
#include "key-reader.h"
#include "key-emulator.h"
#include "key-writer.h"
#include "../ibutton-key.h"
#include "key_info.h"
#include "key_reader.h"
#include "key_emulator.h"
#include "key_writer.h"
#include "../ibutton_key.h"
#include <one_wire_master.h>
#include <one_wire_slave.h>

View File

@ -1,5 +1,5 @@
#include "key-writer.h"
#include "key-commands.h"
#include "key_writer.h"
#include "key_commands.h"
KeyWriter::KeyWriter(OneWireMaster* _onewire_master) {
onewire_master = _onewire_master;

View File

@ -1,5 +1,5 @@
#pragma once
#include "../ibutton-key.h"
#include "../ibutton_key.h"
#include <one_wire_master.h>
class KeyWriter {

View File

@ -1,4 +1,4 @@
#include "metakom-decoder.h"
#include "metakom_decoder.h"
#include <furi.h>
bool MetakomDecoder::read(uint8_t* _data, uint8_t data_size) {

View File

@ -1,7 +1,7 @@
#include "pulse-sequencer.h"
#include "pulse_sequencer.h"
#include <furi.h>
#include <callback-connector.h>
#include <furi-hal-resources.h>
#include <furi_hal_resources.h>
void PulseSequencer::set_periods(
uint32_t* _periods,

View File

@ -1,4 +1,4 @@
#include "ibutton-app.h"
#include "ibutton_app.h"
// app enter function
extern "C" int32_t ibutton_app(void* p) {

View File

@ -1,4 +1,4 @@
#include "ibutton-app.h"
#include "ibutton_app.h"
#include <stdarg.h>
#include <callback-connector.h>
#include <m-string.h>

View File

@ -2,38 +2,38 @@
#include <map>
#include <list>
#include "ibutton-view-manager.h"
#include "scene/ibutton-scene-generic.h"
#include "scene/ibutton-scene-start.h"
#include "scene/ibutton-scene-read.h"
#include "scene/ibutton-scene-read-crc-error.h"
#include "scene/ibutton-scene-read-not-key-error.h"
#include "scene/ibutton-scene-read-success.h"
#include "scene/ibutton-scene-readed-key-menu.h"
#include "scene/ibutton-scene-write.h"
#include "scene/ibutton-scene-write-success.h"
#include "scene/ibutton-scene-saved-key-menu.h"
#include "scene/ibutton-scene-delete-confirm.h"
#include "scene/ibutton-scene-delete-success.h"
#include "scene/ibutton-scene-emulate.h"
#include "scene/ibutton-scene-save-name.h"
#include "scene/ibutton-scene-save-success.h"
#include "scene/ibutton-scene-info.h"
#include "scene/ibutton-scene-select-key.h"
#include "scene/ibutton-scene-add-type.h"
#include "scene/ibutton-scene-add-value.h"
#include "ibutton_view_manager.h"
#include "scene/ibutton_scene_generic.h"
#include "scene/ibutton_scene_start.h"
#include "scene/ibutton_scene_read.h"
#include "scene/ibutton_scene_read_crc_error.h"
#include "scene/ibutton_scene_read_not_key_error.h"
#include "scene/ibutton_scene_read_success.h"
#include "scene/ibutton_scene_readed_key_menu.h"
#include "scene/ibutton_scene_write.h"
#include "scene/ibutton_scene_write_success.h"
#include "scene/ibutton_scene_saved_key_menu.h"
#include "scene/ibutton_scene_delete_confirm.h"
#include "scene/ibutton_scene_delete_success.h"
#include "scene/ibutton_scene_emulate.h"
#include "scene/ibutton_scene_save_name.h"
#include "scene/ibutton_scene_save_success.h"
#include "scene/ibutton_scene_info.h"
#include "scene/ibutton_scene_select_key.h"
#include "scene/ibutton_scene_add_type.h"
#include "scene/ibutton_scene_add_value.h"
#include "helpers/key-worker.h"
#include "helpers/key_worker.h"
#include "one_wire_master.h"
#include "maxim_crc.h"
#include "ibutton-key.h"
#include "ibutton_key.h"
#include <notification/notification-messages.h>
#include <notification/notification_messages.h>
#include <storage/storage.h>
#include <dialogs/dialogs.h>
#include <record-controller.hpp>
#include <record_controller.hpp>
class iButtonApp {
public:

View File

@ -1,11 +1,11 @@
#include <furi.h>
#include <furi-hal.h>
#include <furi_hal.h>
#include <stdarg.h>
#include <cli/cli.h>
#include <lib/toolbox/args.h>
#include "helpers/key-info.h"
#include "helpers/key-worker.h"
#include "helpers/key_info.h"
#include "helpers/key_worker.h"
#include <memory>

Some files were not shown because too many files have changed in this diff Show More