mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 12:42:30 +04:00
faploader api extension and lib fixes
OFW PR 1742 by hedger keeping api version the same to allow compatibility it might be changed in next releases if api changes are destructive
This commit is contained in:
@@ -113,7 +113,12 @@ Header,+,lib/drivers/nrf24.h,,
|
|||||||
Header,+,lib/flipper_application/flipper_application.h,,
|
Header,+,lib/flipper_application/flipper_application.h,,
|
||||||
Header,+,lib/flipper_format/flipper_format.h,,
|
Header,+,lib/flipper_format/flipper_format.h,,
|
||||||
Header,+,lib/flipper_format/flipper_format_i.h,,
|
Header,+,lib/flipper_format/flipper_format_i.h,,
|
||||||
|
Header,+,lib/lfrfid/lfrfid_dict_file.h,,
|
||||||
|
Header,+,lib/lfrfid/lfrfid_raw_file.h,,
|
||||||
|
Header,+,lib/lfrfid/lfrfid_raw_worker.h,,
|
||||||
Header,+,lib/lfrfid/lfrfid_worker.h,,
|
Header,+,lib/lfrfid/lfrfid_worker.h,,
|
||||||
|
Header,+,lib/lfrfid/protocols/lfrfid_protocols.h,,
|
||||||
|
Header,+,lib/lfrfid/tools/bit_lib.h,,
|
||||||
Header,+,lib/micro-ecc/uECC.h,,
|
Header,+,lib/micro-ecc/uECC.h,,
|
||||||
Header,+,lib/one_wire/ibutton/ibutton_worker.h,,
|
Header,+,lib/one_wire/ibutton/ibutton_worker.h,,
|
||||||
Header,+,lib/one_wire/maxim_crc.h,,
|
Header,+,lib/one_wire/maxim_crc.h,,
|
||||||
@@ -477,6 +482,26 @@ Function,-,atomo_encrypt,void,uint8_t*
|
|||||||
Function,-,basename,char*,const char*
|
Function,-,basename,char*,const char*
|
||||||
Function,-,bcmp,int,"const void*, const void*, size_t"
|
Function,-,bcmp,int,"const void*, const void*, size_t"
|
||||||
Function,-,bcopy,void,"const void*, void*, size_t"
|
Function,-,bcopy,void,"const void*, void*, size_t"
|
||||||
|
Function,+,bit_lib_add_parity,size_t,"const uint8_t*, size_t, uint8_t*, size_t, uint8_t, uint8_t, BitLibParity"
|
||||||
|
Function,+,bit_lib_copy_bits,void,"uint8_t*, size_t, size_t, const uint8_t*, size_t"
|
||||||
|
Function,+,bit_lib_crc16,uint16_t,"const uint8_t*, size_t, uint16_t, uint16_t, _Bool, _Bool, uint16_t"
|
||||||
|
Function,+,bit_lib_crc8,uint16_t,"const uint8_t*, size_t, uint8_t, uint8_t, _Bool, _Bool, uint8_t"
|
||||||
|
Function,+,bit_lib_get_bit,_Bool,"const uint8_t*, size_t"
|
||||||
|
Function,+,bit_lib_get_bit_count,uint8_t,uint32_t
|
||||||
|
Function,+,bit_lib_get_bits,uint8_t,"const uint8_t*, size_t, uint8_t"
|
||||||
|
Function,+,bit_lib_get_bits_16,uint16_t,"const uint8_t*, size_t, uint8_t"
|
||||||
|
Function,+,bit_lib_get_bits_32,uint32_t,"const uint8_t*, size_t, uint8_t"
|
||||||
|
Function,+,bit_lib_print_bits,void,"const uint8_t*, size_t"
|
||||||
|
Function,+,bit_lib_print_regions,void,"const BitLibRegion*, size_t, const uint8_t*, size_t"
|
||||||
|
Function,+,bit_lib_push_bit,void,"uint8_t*, size_t, _Bool"
|
||||||
|
Function,+,bit_lib_remove_bit_every_nth,size_t,"uint8_t*, size_t, uint8_t, uint8_t"
|
||||||
|
Function,+,bit_lib_reverse_16_fast,uint16_t,uint16_t
|
||||||
|
Function,+,bit_lib_reverse_8_fast,uint8_t,uint8_t
|
||||||
|
Function,+,bit_lib_reverse_bits,void,"uint8_t*, size_t, uint8_t"
|
||||||
|
Function,+,bit_lib_set_bit,void,"uint8_t*, size_t, _Bool"
|
||||||
|
Function,+,bit_lib_set_bits,void,"uint8_t*, size_t, uint8_t, uint8_t"
|
||||||
|
Function,+,bit_lib_test_parity,_Bool,"const uint8_t*, size_t, uint8_t, BitLibParity, uint8_t"
|
||||||
|
Function,+,bit_lib_test_parity_32,_Bool,"uint32_t, BitLibParity"
|
||||||
Function,+,ble_app_get_key_storage_buff,void,"uint8_t**, uint16_t*"
|
Function,+,ble_app_get_key_storage_buff,void,"uint8_t**, uint16_t*"
|
||||||
Function,+,ble_app_init,_Bool,
|
Function,+,ble_app_init,_Bool,
|
||||||
Function,+,ble_app_thread_stop,void,
|
Function,+,ble_app_thread_stop,void,
|
||||||
@@ -1128,7 +1153,6 @@ Function,+,furi_hal_power_get_battery_remaining_capacity,uint32_t,
|
|||||||
Function,+,furi_hal_power_get_battery_temperature,float,FuriHalPowerIC
|
Function,+,furi_hal_power_get_battery_temperature,float,FuriHalPowerIC
|
||||||
Function,+,furi_hal_power_get_battery_voltage,float,FuriHalPowerIC
|
Function,+,furi_hal_power_get_battery_voltage,float,FuriHalPowerIC
|
||||||
Function,+,furi_hal_power_get_pct,uint8_t,
|
Function,+,furi_hal_power_get_pct,uint8_t,
|
||||||
Function,-,furi_hal_power_get_system_voltage,float,
|
|
||||||
Function,+,furi_hal_power_get_usb_voltage,float,
|
Function,+,furi_hal_power_get_usb_voltage,float,
|
||||||
Function,+,furi_hal_power_info_get,void,"FuriHalPowerInfoCallback, void*"
|
Function,+,furi_hal_power_info_get,void,"FuriHalPowerInfoCallback, void*"
|
||||||
Function,-,furi_hal_power_init,void,
|
Function,-,furi_hal_power_init,void,
|
||||||
@@ -1497,6 +1521,21 @@ Function,-,ldexp,double,"double, int"
|
|||||||
Function,-,ldexpf,float,"float, int"
|
Function,-,ldexpf,float,"float, int"
|
||||||
Function,-,ldexpl,long double,"long double, int"
|
Function,-,ldexpl,long double,"long double, int"
|
||||||
Function,-,ldiv,ldiv_t,"long, long"
|
Function,-,ldiv,ldiv_t,"long, long"
|
||||||
|
Function,+,lfrfid_dict_file_load,ProtocolId,"ProtocolDict*, const char*"
|
||||||
|
Function,+,lfrfid_dict_file_save,_Bool,"ProtocolDict*, ProtocolId, const char*"
|
||||||
|
Function,+,lfrfid_raw_file_alloc,LFRFIDRawFile*,Storage*
|
||||||
|
Function,+,lfrfid_raw_file_free,void,LFRFIDRawFile*
|
||||||
|
Function,+,lfrfid_raw_file_open_read,_Bool,"LFRFIDRawFile*, const char*"
|
||||||
|
Function,+,lfrfid_raw_file_open_write,_Bool,"LFRFIDRawFile*, const char*"
|
||||||
|
Function,+,lfrfid_raw_file_read_header,_Bool,"LFRFIDRawFile*, float*, float*"
|
||||||
|
Function,+,lfrfid_raw_file_read_pair,_Bool,"LFRFIDRawFile*, uint32_t*, uint32_t*, _Bool*"
|
||||||
|
Function,+,lfrfid_raw_file_write_buffer,_Bool,"LFRFIDRawFile*, uint8_t*, size_t"
|
||||||
|
Function,+,lfrfid_raw_file_write_header,_Bool,"LFRFIDRawFile*, float, float, uint32_t"
|
||||||
|
Function,+,lfrfid_raw_worker_alloc,LFRFIDRawWorker*,
|
||||||
|
Function,+,lfrfid_raw_worker_free,void,LFRFIDRawWorker*
|
||||||
|
Function,+,lfrfid_raw_worker_start_emulate,void,"LFRFIDRawWorker*, const char*, LFRFIDWorkerEmulateRawCallback, void*"
|
||||||
|
Function,+,lfrfid_raw_worker_start_read,void,"LFRFIDRawWorker*, const char*, float, float, LFRFIDWorkerReadRawCallback, void*"
|
||||||
|
Function,+,lfrfid_raw_worker_stop,void,LFRFIDRawWorker*
|
||||||
Function,+,lfrfid_worker_alloc,LFRFIDWorker*,ProtocolDict*
|
Function,+,lfrfid_worker_alloc,LFRFIDWorker*,ProtocolDict*
|
||||||
Function,-,lfrfid_worker_emulate_raw_start,void,"LFRFIDWorker*, const char*, LFRFIDWorkerEmulateRawCallback, void*"
|
Function,-,lfrfid_worker_emulate_raw_start,void,"LFRFIDWorker*, const char*, LFRFIDWorkerEmulateRawCallback, void*"
|
||||||
Function,+,lfrfid_worker_emulate_start,void,"LFRFIDWorker*, LFRFIDProtocol"
|
Function,+,lfrfid_worker_emulate_start,void,"LFRFIDWorker*, LFRFIDProtocol"
|
||||||
@@ -2620,7 +2659,6 @@ Function,-,subghz_protocol_faac_slh_create_data,_Bool,"void*, FlipperFormat*, ui
|
|||||||
Function,-,subghz_protocol_keeloq_bft_create_data,_Bool,"void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, uint32_t, const char*, SubGhzPresetDefinition*"
|
Function,-,subghz_protocol_keeloq_bft_create_data,_Bool,"void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, uint32_t, const char*, SubGhzPresetDefinition*"
|
||||||
Function,-,subghz_protocol_keeloq_create_data,_Bool,"void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, const char*, SubGhzPresetDefinition*"
|
Function,-,subghz_protocol_keeloq_create_data,_Bool,"void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, const char*, SubGhzPresetDefinition*"
|
||||||
Function,-,subghz_protocol_nice_flor_s_encrypt,uint64_t,"uint64_t, const char*"
|
Function,-,subghz_protocol_nice_flor_s_encrypt,uint64_t,"uint64_t, const char*"
|
||||||
Function,-,subghz_protocol_raw_file_encoder_worker_callback_end,void,void*
|
|
||||||
Function,-,subghz_protocol_raw_file_encoder_worker_set_callback_end,void,"SubGhzProtocolEncoderRAW*, SubGhzProtocolEncoderRAWCallbackEnd, void*"
|
Function,-,subghz_protocol_raw_file_encoder_worker_set_callback_end,void,"SubGhzProtocolEncoderRAW*, SubGhzProtocolEncoderRAWCallbackEnd, void*"
|
||||||
Function,+,subghz_protocol_raw_gen_fff_data,void,"FlipperFormat*, const char*"
|
Function,+,subghz_protocol_raw_gen_fff_data,void,"FlipperFormat*, const char*"
|
||||||
Function,-,subghz_protocol_raw_get_sample_write,size_t,SubGhzProtocolDecoderRAW*
|
Function,-,subghz_protocol_raw_get_sample_write,size_t,SubGhzProtocolDecoderRAW*
|
||||||
|
|||||||
|
@@ -156,12 +156,6 @@ float furi_hal_power_get_battery_current(FuriHalPowerIC ic);
|
|||||||
*/
|
*/
|
||||||
float furi_hal_power_get_battery_temperature(FuriHalPowerIC ic);
|
float furi_hal_power_get_battery_temperature(FuriHalPowerIC ic);
|
||||||
|
|
||||||
/** Get System voltage in V
|
|
||||||
*
|
|
||||||
* @return voltage in V
|
|
||||||
*/
|
|
||||||
float furi_hal_power_get_system_voltage();
|
|
||||||
|
|
||||||
/** Get USB voltage in V
|
/** Get USB voltage in V
|
||||||
*
|
*
|
||||||
* @return voltage in V
|
* @return voltage in V
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ env.Append(
|
|||||||
],
|
],
|
||||||
SDK_HEADERS=[
|
SDK_HEADERS=[
|
||||||
File("#/lib/lfrfid/lfrfid_worker.h"),
|
File("#/lib/lfrfid/lfrfid_worker.h"),
|
||||||
|
File("#/lib/lfrfid/lfrfid_raw_worker.h"),
|
||||||
|
File("#/lib/lfrfid/lfrfid_raw_file.h"),
|
||||||
|
File("#/lib/lfrfid/lfrfid_dict_file.h"),
|
||||||
|
File("#/lib/lfrfid/tools/bit_lib.h"),
|
||||||
|
File("#/lib/lfrfid/protocols/lfrfid_protocols.h"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,14 @@ env.Append(
|
|||||||
libenv = env.Clone(FW_LIB_NAME="mbedtls")
|
libenv = env.Clone(FW_LIB_NAME="mbedtls")
|
||||||
libenv.ApplyLibFlags()
|
libenv.ApplyLibFlags()
|
||||||
|
|
||||||
|
libenv.AppendUnique(
|
||||||
|
CCFLAGS=[
|
||||||
|
# Required for lib to be linkable with .faps
|
||||||
|
"-mword-relocations",
|
||||||
|
"-mlong-calls",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
sources = [
|
sources = [
|
||||||
"mbedtls/library/des.c",
|
"mbedtls/library/des.c",
|
||||||
"mbedtls/library/sha1.c",
|
"mbedtls/library/sha1.c",
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
|
|
||||||
|
#define SUBGHZ_PROTOCOL_RAW_NAME "RAW"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SUBGHZ_PROTOCOL_RAW_NAME "RAW"
|
|
||||||
|
|
||||||
typedef void (*SubGhzProtocolEncoderRAWCallbackEnd)(void* context);
|
typedef void (*SubGhzProtocolEncoderRAWCallbackEnd)(void* context);
|
||||||
|
|
||||||
typedef struct SubGhzProtocolDecoderRAW SubGhzProtocolDecoderRAW;
|
typedef struct SubGhzProtocolDecoderRAW SubGhzProtocolDecoderRAW;
|
||||||
@@ -142,12 +142,6 @@ void subghz_protocol_encoder_raw_free(void* context);
|
|||||||
*/
|
*/
|
||||||
void subghz_protocol_encoder_raw_stop(void* context);
|
void subghz_protocol_encoder_raw_stop(void* context);
|
||||||
|
|
||||||
/**
|
|
||||||
* Сallback on completion of file transfer.
|
|
||||||
* @param context Pointer to a SubGhzProtocolEncoderRAW instance
|
|
||||||
*/
|
|
||||||
void subghz_protocol_raw_file_encoder_worker_callback_end(void* context);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set callback on completion of file transfer.
|
* Set callback on completion of file transfer.
|
||||||
* @param instance Pointer to a SubGhzProtocolEncoderRAW instance
|
* @param instance Pointer to a SubGhzProtocolEncoderRAW instance
|
||||||
|
|||||||
@@ -484,20 +484,22 @@ class SdkCache:
|
|||||||
break
|
break
|
||||||
self.loaded_dirty = bool(self.new_entries)
|
self.loaded_dirty = bool(self.new_entries)
|
||||||
|
|
||||||
def sync_sets(self, known_set: Set[Any], new_set: Set[Any]):
|
def sync_sets(
|
||||||
|
self, known_set: Set[Any], new_set: Set[Any], update_version: bool = True
|
||||||
|
):
|
||||||
new_entries = new_set - known_set
|
new_entries = new_set - known_set
|
||||||
if new_entries:
|
if new_entries:
|
||||||
print(f"New: {new_entries}")
|
print(f"New: {new_entries}")
|
||||||
known_set |= new_entries
|
known_set |= new_entries
|
||||||
self.new_entries |= new_entries
|
self.new_entries |= new_entries
|
||||||
if self.version_action == VersionBump.NONE:
|
if update_version and self.version_action == VersionBump.NONE:
|
||||||
self.version_action = VersionBump.MINOR
|
self.version_action = VersionBump.MINOR
|
||||||
removed_entries = known_set - new_set
|
removed_entries = known_set - new_set
|
||||||
if removed_entries:
|
if removed_entries:
|
||||||
print(f"Removed: {removed_entries}")
|
print(f"Removed: {removed_entries}")
|
||||||
known_set -= removed_entries
|
known_set -= removed_entries
|
||||||
# If any of removed entries was part of active API, that's a major bump
|
# If any of removed entries was a part of active API, that's a major bump
|
||||||
if any(
|
if update_version and any(
|
||||||
filter(
|
filter(
|
||||||
lambda e: e not in self.disabled_entries
|
lambda e: e not in self.disabled_entries
|
||||||
and e not in self.new_entries,
|
and e not in self.new_entries,
|
||||||
@@ -509,6 +511,6 @@ class SdkCache:
|
|||||||
self.new_entries -= removed_entries
|
self.new_entries -= removed_entries
|
||||||
|
|
||||||
def validate_api(self, api: ApiEntries) -> None:
|
def validate_api(self, api: ApiEntries) -> None:
|
||||||
self.sync_sets(self.sdk.headers, api.headers)
|
self.sync_sets(self.sdk.headers, api.headers, False)
|
||||||
self.sync_sets(self.sdk.functions, api.functions)
|
self.sync_sets(self.sdk.functions, api.functions)
|
||||||
self.sync_sets(self.sdk.variables, api.variables)
|
self.sync_sets(self.sdk.variables, api.variables)
|
||||||
|
|||||||
Reference in New Issue
Block a user