From d7221f1b0dc4fec7fa6fe4a8d9959a34a55dbb7b Mon Sep 17 00:00:00 2001 From: hedger Date: Sat, 22 Feb 2025 18:39:52 +0000 Subject: [PATCH] hal: more consts for ble & nfc vars --- targets/f18/api_symbols.csv | 2 +- targets/f7/api_symbols.csv | 2 +- targets/f7/ble_glue/profiles/serial_profile.c | 4 ++-- targets/f7/ble_glue/profiles/serial_profile.h | 2 +- targets/f7/furi_hal/furi_hal_nfc.c | 2 +- targets/f7/furi_hal/furi_hal_nfc_tech_i.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/targets/f18/api_symbols.csv b/targets/f18/api_symbols.csv index 27d0fe38c..2d6cbf2f0 100644 --- a/targets/f18/api_symbols.csv +++ b/targets/f18/api_symbols.csv @@ -2935,7 +2935,7 @@ Variable,+,_impure_ptr,_reent*, Variable,-,_sys_errlist,const char* const[], Variable,-,_sys_nerr,int, Variable,-,ble_profile_hid,const FuriHalBleProfileTemplate*, -Variable,-,ble_profile_serial,const FuriHalBleProfileTemplate*, +Variable,+,ble_profile_serial,const FuriHalBleProfileTemplate* const, Variable,+,cli_vcp,const CliSession, Variable,+,compress_config_heatshrink_default,const CompressConfigHeatshrink, Variable,+,firmware_api_interface,const ElfApiInterface* const, diff --git a/targets/f7/api_symbols.csv b/targets/f7/api_symbols.csv index b9e555339..4346547f3 100644 --- a/targets/f7/api_symbols.csv +++ b/targets/f7/api_symbols.csv @@ -3786,7 +3786,7 @@ Variable,+,_impure_ptr,_reent*, Variable,-,_sys_errlist,const char* const[], Variable,-,_sys_nerr,int, Variable,-,ble_profile_hid,const FuriHalBleProfileTemplate*, -Variable,-,ble_profile_serial,const FuriHalBleProfileTemplate*, +Variable,+,ble_profile_serial,const FuriHalBleProfileTemplate* const, Variable,+,cli_vcp,const CliSession, Variable,+,compress_config_heatshrink_default,const CompressConfigHeatshrink, Variable,+,firmware_api_interface,const ElfApiInterface* const, diff --git a/targets/f7/ble_glue/profiles/serial_profile.c b/targets/f7/ble_glue/profiles/serial_profile.c index 1d414889f..427539427 100644 --- a/targets/f7/ble_glue/profiles/serial_profile.c +++ b/targets/f7/ble_glue/profiles/serial_profile.c @@ -46,7 +46,7 @@ static void ble_profile_serial_stop(FuriHalBleProfileBase* profile) { // Up to 45 ms #define CONNECTION_INTERVAL_MAX (0x24) -static GapConfig serial_template_config = { +static const GapConfig serial_template_config = { .adv_service_uuid = 0x3080, .appearance_char = 0x8600, .bonding_mode = true, @@ -80,7 +80,7 @@ static const FuriHalBleProfileTemplate profile_callbacks = { .get_gap_config = ble_profile_serial_get_config, }; -const FuriHalBleProfileTemplate* ble_profile_serial = &profile_callbacks; +const FuriHalBleProfileTemplate* const ble_profile_serial = &profile_callbacks; void ble_profile_serial_set_event_callback( FuriHalBleProfileBase* profile, diff --git a/targets/f7/ble_glue/profiles/serial_profile.h b/targets/f7/ble_glue/profiles/serial_profile.h index e07eaef03..7938bfc33 100644 --- a/targets/f7/ble_glue/profiles/serial_profile.h +++ b/targets/f7/ble_glue/profiles/serial_profile.h @@ -19,7 +19,7 @@ typedef enum { typedef SerialServiceEventCallback FuriHalBtSerialCallback; /** Serial profile descriptor */ -extern const FuriHalBleProfileTemplate* ble_profile_serial; +extern const FuriHalBleProfileTemplate* const ble_profile_serial; /** Send data through BLE * diff --git a/targets/f7/furi_hal/furi_hal_nfc.c b/targets/f7/furi_hal/furi_hal_nfc.c index ee7a04e45..9d336c508 100644 --- a/targets/f7/furi_hal/furi_hal_nfc.c +++ b/targets/f7/furi_hal/furi_hal_nfc.c @@ -8,7 +8,7 @@ #define TAG "FuriHalNfc" -const FuriHalNfcTechBase* furi_hal_nfc_tech[FuriHalNfcTechNum] = { +const FuriHalNfcTechBase* const furi_hal_nfc_tech[FuriHalNfcTechNum] = { [FuriHalNfcTechIso14443a] = &furi_hal_nfc_iso14443a, [FuriHalNfcTechIso14443b] = &furi_hal_nfc_iso14443b, [FuriHalNfcTechIso15693] = &furi_hal_nfc_iso15693, diff --git a/targets/f7/furi_hal/furi_hal_nfc_tech_i.h b/targets/f7/furi_hal/furi_hal_nfc_tech_i.h index e36dc852e..a2a75aa66 100644 --- a/targets/f7/furi_hal/furi_hal_nfc_tech_i.h +++ b/targets/f7/furi_hal/furi_hal_nfc_tech_i.h @@ -160,7 +160,7 @@ extern const FuriHalNfcTechBase furi_hal_nfc_felica; * This variable is defined in furi_hal_nfc.c. It will need to be modified * in case when a new technology is to be added. */ -extern const FuriHalNfcTechBase* furi_hal_nfc_tech[]; +extern const FuriHalNfcTechBase* const furi_hal_nfc_tech[]; #ifdef __cplusplus }