[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>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Early initialization */
|
||||
void furi_hal_clock_init_early();
|
||||
|
||||
@@ -20,3 +24,7 @@ void furi_hal_clock_suspend_tick();
|
||||
|
||||
/** Continue SysTick counter operation */
|
||||
void furi_hal_clock_resume_tick();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -4,6 +4,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FURI_HAL_FLASH_OB_RAW_SIZE_BYTES 0x80
|
||||
#define FURI_HAL_FLASH_OB_SIZE_WORDS (FURI_HAL_FLASH_OB_RAW_SIZE_BYTES / sizeof(uint32_t))
|
||||
#define FURI_HAL_FLASH_OB_TOTAL_VALUES (FURI_HAL_FLASH_OB_SIZE_WORDS / 2)
|
||||
@@ -142,3 +146,7 @@ void furi_hal_flash_ob_apply();
|
||||
* @return pointer to read-only data of OB (raw + complementary values)
|
||||
*/
|
||||
const FuriHalFlashRawOptionByteData* furi_hal_flash_ob_get_raw_ptr();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -124,9 +124,9 @@ bool furi_hal_nfc_detect(FuriHalNfcDevData* nfc_data, uint32_t timeout) {
|
||||
}
|
||||
nfc_data->cuid = (cuid_start[0] << 24) | (cuid_start[1] << 16) | (cuid_start[2] << 8) |
|
||||
(cuid_start[3]);
|
||||
} else if(dev_list[0].type == RFAL_NFC_LISTEN_TYPE_NFCB ||
|
||||
dev_list[0].type == RFAL_NFC_LISTEN_TYPE_ST25TB)
|
||||
{
|
||||
} else if(
|
||||
dev_list[0].type == RFAL_NFC_LISTEN_TYPE_NFCB ||
|
||||
dev_list[0].type == RFAL_NFC_LISTEN_TYPE_ST25TB) {
|
||||
nfc_data->type = FuriHalNfcTypeB;
|
||||
} else if(dev_list[0].type == RFAL_NFC_LISTEN_TYPE_NFCF) {
|
||||
nfc_data->type = FuriHalNfcTypeF;
|
||||
@@ -738,3 +738,46 @@ void furi_hal_nfc_sleep() {
|
||||
rfalNfcDeactivate(false);
|
||||
rfalLowPowerModeStart();
|
||||
}
|
||||
|
||||
FuriHalNfcReturn furi_hal_nfc_ll_set_mode(FuriHalNfcMode mode, FuriHalNfcBitrate txBR, FuriHalNfcBitrate rxBR) {
|
||||
return rfalSetMode((rfalMode)mode, (rfalBitRate)txBR, (rfalBitRate)rxBR);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_set_error_handling(FuriHalNfcErrorHandling eHandling) {
|
||||
rfalSetErrorHandling((rfalEHandling)eHandling);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_set_guard_time(uint32_t cycles) {
|
||||
rfalSetGT(cycles);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_set_fdt_listen(uint32_t cycles) {
|
||||
rfalSetFDTListen(cycles);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_set_fdt_poll(uint32_t FDTPoll) {
|
||||
rfalSetFDTPoll(FDTPoll);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_txrx_on() {
|
||||
st25r3916TxRxOn();
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_txrx_off() {
|
||||
st25r3916TxRxOff();
|
||||
}
|
||||
|
||||
FuriHalNfcReturn furi_hal_nfc_ll_txrx(
|
||||
uint8_t* txBuf,
|
||||
uint16_t txBufLen,
|
||||
uint8_t* rxBuf,
|
||||
uint16_t rxBufLen,
|
||||
uint16_t* actLen,
|
||||
uint32_t flags,
|
||||
uint32_t fwt) {
|
||||
return rfalTransceiveBlockingTxRx(txBuf, txBufLen, rxBuf, rxBufLen, actLen, flags, fwt);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_poll() {
|
||||
rfalWorker();
|
||||
}
|
@@ -17,7 +17,6 @@
|
||||
|
||||
#define TAG "FuriHalSubGhz"
|
||||
|
||||
|
||||
/*
|
||||
* Uncomment define to enable duplication of
|
||||
* IO GO0 CC1101 to an external comb.
|
||||
@@ -33,7 +32,7 @@
|
||||
* Attention this setting switches pin to output.
|
||||
* Make sure it is not connected directly to power or ground
|
||||
*/
|
||||
|
||||
|
||||
//#define SUBGHZ_DEBUG_CC1101_PIN gpio_ext_pa7
|
||||
#ifdef SUBGHZ_DEBUG_CC1101_PIN
|
||||
uint32_t subghz_debug_gpio_buff[2];
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "furi_hal_version.h"
|
||||
#include "furi_hal_usb_i.h"
|
||||
#include "furi_hal_usb.h"
|
||||
#include "furi_hal_usb_cdc_i.h"
|
||||
#include "furi_hal_usb_cdc.h"
|
||||
#include <furi.h>
|
||||
|
||||
#include "usb.h"
|
||||
|
@@ -5,6 +5,10 @@
|
||||
|
||||
#define CDC_DATA_SZ 64
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
void (*tx_ep_callback)(void* context);
|
||||
void (*rx_ep_callback)(void* context);
|
||||
@@ -22,3 +26,7 @@ uint8_t furi_hal_cdc_get_ctrl_line_state(uint8_t if_num);
|
||||
void furi_hal_cdc_send(uint8_t if_num, uint8_t* buf, uint16_t len);
|
||||
|
||||
int32_t furi_hal_cdc_receive(uint8_t if_num, uint8_t* buf, uint16_t max_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user