From 4ae9a02efaeae2be8d23f6c36670cbe8e39decce Mon Sep 17 00:00:00 2001
From: hedger
Date: Mon, 9 Oct 2023 15:53:20 +0300
Subject: [PATCH 1/5] FuriHal ble: length fix for fw version prop (#3136)
* hal ble: length fix for fw version prop
* hal ble: dev_info char: setting data after setup is done
* api: storage: enabled storage_file_sync
---
firmware/targets/f18/api_symbols.csv | 4 ++--
firmware/targets/f7/api_symbols.csv | 4 ++--
firmware/targets/f7/ble_glue/services/dev_info_service.c | 6 ++++--
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/firmware/targets/f18/api_symbols.csv b/firmware/targets/f18/api_symbols.csv
index 338697ad70..a3eb2743d8 100644
--- a/firmware/targets/f18/api_symbols.csv
+++ b/firmware/targets/f18/api_symbols.csv
@@ -1,5 +1,5 @@
entry,status,name,type,params
-Version,+,39.1,,
+Version,+,39.2,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@@ -2007,7 +2007,7 @@ Function,+,storage_file_open,_Bool,"File*, const char*, FS_AccessMode, FS_OpenMo
Function,+,storage_file_read,uint16_t,"File*, void*, uint16_t"
Function,+,storage_file_seek,_Bool,"File*, uint32_t, _Bool"
Function,+,storage_file_size,uint64_t,File*
-Function,-,storage_file_sync,_Bool,File*
+Function,+,storage_file_sync,_Bool,File*
Function,+,storage_file_tell,uint64_t,File*
Function,+,storage_file_truncate,_Bool,File*
Function,+,storage_file_write,uint16_t,"File*, const void*, uint16_t"
diff --git a/firmware/targets/f7/api_symbols.csv b/firmware/targets/f7/api_symbols.csv
index f3f42d0f09..eb997e64b1 100644
--- a/firmware/targets/f7/api_symbols.csv
+++ b/firmware/targets/f7/api_symbols.csv
@@ -1,5 +1,5 @@
entry,status,name,type,params
-Version,+,39.1,,
+Version,+,39.2,,
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
@@ -2617,7 +2617,7 @@ Function,+,storage_file_open,_Bool,"File*, const char*, FS_AccessMode, FS_OpenMo
Function,+,storage_file_read,uint16_t,"File*, void*, uint16_t"
Function,+,storage_file_seek,_Bool,"File*, uint32_t, _Bool"
Function,+,storage_file_size,uint64_t,File*
-Function,-,storage_file_sync,_Bool,File*
+Function,+,storage_file_sync,_Bool,File*
Function,+,storage_file_tell,uint64_t,File*
Function,+,storage_file_truncate,_Bool,File*
Function,+,storage_file_write,uint16_t,"File*, const void*, uint16_t"
diff --git a/firmware/targets/f7/ble_glue/services/dev_info_service.c b/firmware/targets/f7/ble_glue/services/dev_info_service.c
index cc95bb2fc1..59af23e5c2 100644
--- a/firmware/targets/f7/ble_glue/services/dev_info_service.c
+++ b/firmware/targets/f7/ble_glue/services/dev_info_service.c
@@ -39,7 +39,7 @@ static bool dev_info_char_firmware_rev_callback(
const uint8_t** data,
uint16_t* data_len) {
const DevInfoSvc* dev_info_svc = *(DevInfoSvc**)context;
- *data_len = sizeof(dev_info_svc->hardware_revision);
+ *data_len = strlen(dev_info_svc->hardware_revision);
if(data) {
*data = (const uint8_t*)&dev_info_svc->hardware_revision;
}
@@ -155,17 +155,19 @@ void dev_info_svc_start() {
void dev_info_svc_stop() {
tBleStatus status;
if(dev_info_svc) {
- furi_string_free(dev_info_svc->version_string);
// Delete service characteristics
for(size_t i = 0; i < DevInfoSvcGattCharacteristicCount; i++) {
flipper_gatt_characteristic_delete(
dev_info_svc->service_handle, &dev_info_svc->characteristics[i]);
}
+
// Delete service
status = aci_gatt_del_service(dev_info_svc->service_handle);
if(status) {
FURI_LOG_E(TAG, "Failed to delete device info service: %d", status);
}
+
+ furi_string_free(dev_info_svc->version_string);
free(dev_info_svc);
dev_info_svc = NULL;
}
From fbded1e4ee79b6347ed223c2260dfb60559fed62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=82=E3=81=8F?=
Date: Mon, 9 Oct 2023 22:03:27 +0900
Subject: [PATCH 2/5] Lib: update stm32wb_copro to 1.17.3 release (#3119)
* Lib: update stm32wb_copro to 1.17.3 release
* Bump copro versions
* Lib: switch stm32_copro to release
---
fbt_options.py | 2 +-
firmware/targets/f7/ble_glue/ble_app.c | 2 +-
lib/stm32wb_copro | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fbt_options.py b/fbt_options.py
index d13abbe5e2..277790a403 100644
--- a/fbt_options.py
+++ b/fbt_options.py
@@ -22,7 +22,7 @@
COPRO_OB_DATA = "scripts/ob.data"
# Must match lib/stm32wb_copro version
-COPRO_CUBE_VERSION = "1.17.2"
+COPRO_CUBE_VERSION = "1.17.3"
COPRO_CUBE_DIR = "lib/stm32wb_copro"
diff --git a/firmware/targets/f7/ble_glue/ble_app.c b/firmware/targets/f7/ble_glue/ble_app.c
index 37ec3d0b9e..05dd46e943 100644
--- a/firmware/targets/f7/ble_glue/ble_app.c
+++ b/firmware/targets/f7/ble_glue/ble_app.c
@@ -19,7 +19,7 @@ PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint32_t ble_app_nvm[BLE_NVM_SRAM_SI
_Static_assert(
sizeof(SHCI_C2_Ble_Init_Cmd_Packet_t) == 58,
- "Ble stack config structure size mismatch (check new config options - last updated for v.1.17.2)");
+ "Ble stack config structure size mismatch (check new config options - last updated for v.1.17.3)");
typedef struct {
FuriMutex* hci_mtx;
diff --git a/lib/stm32wb_copro b/lib/stm32wb_copro
index bbccbefae2..d8a6f1feb0 160000
--- a/lib/stm32wb_copro
+++ b/lib/stm32wb_copro
@@ -1 +1 @@
-Subproject commit bbccbefae26a2301b8a4b58e57ebdeb93c08269b
+Subproject commit d8a6f1feb0ebb6798c44162c6ae5ea743f90f3df
From 65a56cdb4acc0dc66d294fd2a8a2198b43487d0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=82=E3=81=8F?=
Date: Tue, 10 Oct 2023 02:55:38 +0900
Subject: [PATCH 3/5] Firmware: bigger thread name storage. Notification app:
better BacklightEnforce edge cases handling. (#3137)
---
.../services/notification/notification_app.c | 17 ++++++++++-------
firmware/targets/f7/inc/FreeRTOSConfig.h | 2 +-
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/applications/services/notification/notification_app.c b/applications/services/notification/notification_app.c
index 6fa48e7f4e..5769ced926 100644
--- a/applications/services/notification/notification_app.c
+++ b/applications/services/notification/notification_app.c
@@ -228,7 +228,7 @@ static void notification_process_notification_message(
}
break;
case NotificationMessageTypeLedDisplayBacklightEnforceOn:
- furi_assert(app->display_led_lock < UINT8_MAX);
+ furi_check(app->display_led_lock < UINT8_MAX);
app->display_led_lock++;
if(app->display_led_lock == 1) {
notification_apply_internal_led_layer(
@@ -237,12 +237,15 @@ static void notification_process_notification_message(
}
break;
case NotificationMessageTypeLedDisplayBacklightEnforceAuto:
- furi_assert(app->display_led_lock > 0);
- app->display_led_lock--;
- if(app->display_led_lock == 0) {
- notification_apply_internal_led_layer(
- &app->display,
- notification_message->data.led.value * display_brightness_setting);
+ if(app->display_led_lock > 0) {
+ app->display_led_lock--;
+ if(app->display_led_lock == 0) {
+ notification_apply_internal_led_layer(
+ &app->display,
+ notification_message->data.led.value * display_brightness_setting);
+ }
+ } else {
+ FURI_LOG_E(TAG, "Incorrect BacklightEnforce use");
}
break;
case NotificationMessageTypeLedRed:
diff --git a/firmware/targets/f7/inc/FreeRTOSConfig.h b/firmware/targets/f7/inc/FreeRTOSConfig.h
index 9486f501c7..024d43a6de 100644
--- a/firmware/targets/f7/inc/FreeRTOSConfig.h
+++ b/firmware/targets/f7/inc/FreeRTOSConfig.h
@@ -26,7 +26,7 @@ extern uint32_t SystemCoreClock;
/* Heap size determined automatically by linker */
// #define configTOTAL_HEAP_SIZE ((size_t)0)
-#define configMAX_TASK_NAME_LEN (16)
+#define configMAX_TASK_NAME_LEN (32)
#define configGENERATE_RUN_TIME_STATS 0
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
From 4308a5e377deb979154fcb046286a9ea84a65207 Mon Sep 17 00:00:00 2001
From: Filipe Paz Rodrigues
Date: Mon, 9 Oct 2023 11:48:37 -0700
Subject: [PATCH 4/5] CCID: Support PC To Reader Transfer Block data (#3126)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* CCID: Support PC To Reader Transfer Block data
* Format sources
Co-authored-by: あく
---
applications/debug/ccid_test/ccid_test_app.c | 18 +-
.../debug/ccid_test/iso7816_t0_apdu.c | 7 +-
.../debug/ccid_test/iso7816_t0_apdu.h | 8 +-
.../targets/f7/furi_hal/furi_hal_usb_ccid.c | 282 ++++++++++--------
.../furi_hal_include/furi_hal_usb_ccid.h | 7 +-
5 files changed, 189 insertions(+), 133 deletions(-)
diff --git a/applications/debug/ccid_test/ccid_test_app.c b/applications/debug/ccid_test/ccid_test_app.c
index a2f936d742..3d7fba39de 100644
--- a/applications/debug/ccid_test/ccid_test_app.c
+++ b/applications/debug/ccid_test/ccid_test_app.c
@@ -39,15 +39,25 @@ void icc_power_on_callback(uint8_t* atrBuffer, uint32_t* atrlen, void* context)
iso7816_answer_to_reset(atrBuffer, atrlen);
}
-void xfr_datablock_callback(uint8_t* dataBlock, uint32_t* dataBlockLen, void* context) {
+//dataBlock points to the buffer
+//dataBlockLen tells reader how nany bytes should be read
+void xfr_datablock_callback(
+ const uint8_t* dataBlock,
+ uint32_t dataBlockLen,
+ uint8_t* responseDataBlock,
+ uint32_t* responseDataBlockLen,
+ void* context) {
UNUSED(context);
+ struct ISO7816_Command_APDU commandAPDU;
+ iso7816_read_command_apdu(&commandAPDU, dataBlock, dataBlockLen);
+
struct ISO7816_Response_APDU responseAPDU;
//class not supported
responseAPDU.SW1 = 0x6E;
responseAPDU.SW2 = 0x00;
- iso7816_write_response_apdu(&responseAPDU, dataBlock, dataBlockLen);
+ iso7816_write_response_apdu(&responseAPDU, responseDataBlock, responseDataBlockLen);
}
static const CcidCallbacks ccid_cb = {
@@ -66,7 +76,7 @@ static void ccid_test_app_render_callback(Canvas* canvas, void* ctx) {
canvas_draw_str(canvas, 0, 63, "Hold [back] to exit");
}
-static void ccid_test_app__input_callback(InputEvent* input_event, void* ctx) {
+static void ccid_test_app_input_callback(InputEvent* input_event, void* ctx) {
FuriMessageQueue* event_queue = ctx;
CcidTestAppEvent event;
@@ -94,7 +104,7 @@ CcidTestApp* ccid_test_app_alloc() {
//message queue
app->event_queue = furi_message_queue_alloc(8, sizeof(CcidTestAppEvent));
furi_check(app->event_queue);
- view_port_input_callback_set(app->view_port, ccid_test_app__input_callback, app->event_queue);
+ view_port_input_callback_set(app->view_port, ccid_test_app_input_callback, app->event_queue);
return app;
}
diff --git a/applications/debug/ccid_test/iso7816_t0_apdu.c b/applications/debug/ccid_test/iso7816_t0_apdu.c
index 29f5f7a86c..7c690a6944 100644
--- a/applications/debug/ccid_test/iso7816_t0_apdu.c
+++ b/applications/debug/ccid_test/iso7816_t0_apdu.c
@@ -4,7 +4,7 @@
#include
#include "iso7816_t0_apdu.h"
-void iso7816_answer_to_reset(uint8_t* atrBuffer, uint32_t* atrlen) {
+void iso7816_answer_to_reset(uint8_t* dataBuffer, uint32_t* atrlen) {
//minimum valid ATR: https://smartcard-atr.apdu.fr/parse?ATR=3B+00
uint8_t AtrBuffer[2] = {
0x3B, //TS (direct convention)
@@ -12,18 +12,19 @@ void iso7816_answer_to_reset(uint8_t* atrBuffer, uint32_t* atrlen) {
};
*atrlen = 2;
- memcpy(atrBuffer, AtrBuffer, sizeof(uint8_t) * (*atrlen));
+ memcpy(dataBuffer, AtrBuffer, sizeof(uint8_t) * (*atrlen));
}
void iso7816_read_command_apdu(
struct ISO7816_Command_APDU* command,
const uint8_t* dataBuffer,
uint32_t dataLen) {
- furi_assert(dataLen <= 4);
+ UNUSED(dataLen);
command->CLA = dataBuffer[0];
command->INS = dataBuffer[1];
command->P1 = dataBuffer[2];
command->P2 = dataBuffer[3];
+ command->Lc = dataBuffer[4];
}
void iso7816_write_response_apdu(
diff --git a/applications/debug/ccid_test/iso7816_t0_apdu.h b/applications/debug/ccid_test/iso7816_t0_apdu.h
index 8a8c99f85d..b66d66054d 100644
--- a/applications/debug/ccid_test/iso7816_t0_apdu.h
+++ b/applications/debug/ccid_test/iso7816_t0_apdu.h
@@ -6,18 +6,18 @@
struct ISO7816_Command_APDU {
//header
uint8_t CLA;
- uint32_t INS;
+ uint8_t INS;
uint8_t P1;
uint8_t P2;
//body
- uint8_t Nc;
- uint8_t Ne;
+ uint8_t Lc;
+ uint8_t Le;
} __attribute__((packed));
struct ISO7816_Response_APDU {
uint8_t SW1;
- uint32_t SW2;
+ uint8_t SW2;
} __attribute__((packed));
void iso7816_answer_to_reset(uint8_t* atrBuffer, uint32_t* atrlen);
diff --git a/firmware/targets/f7/furi_hal/furi_hal_usb_ccid.c b/firmware/targets/f7/furi_hal/furi_hal_usb_ccid.c
index 559713d015..e9906fed46 100644
--- a/firmware/targets/f7/furi_hal/furi_hal_usb_ccid.c
+++ b/firmware/targets/f7/furi_hal/furi_hal_usb_ccid.c
@@ -250,76 +250,136 @@ static void ccid_on_suspend(usbd_device* dev) {
connected = false;
}
-struct ccid_bulk_message_header {
+typedef struct ccid_bulk_message_header {
uint8_t bMessageType;
uint32_t dwLength;
uint8_t bSlot;
uint8_t bSeq;
-} __attribute__((packed));
+} __attribute__((packed)) ccid_bulk_message_header_t;
+
+uint8_t SendBuffer[sizeof(ccid_bulk_message_header_t) + CCID_DATABLOCK_SIZE];
+
+//stores the data p
+uint8_t ReceiveBuffer[sizeof(ccid_bulk_message_header_t) + CCID_DATABLOCK_SIZE];
+
+void CALLBACK_CCID_GetSlotStatus(
+ uint8_t slot,
+ uint8_t seq,
+ struct rdr_to_pc_slot_status* responseSlotStatus) {
+ responseSlotStatus->bMessageType = RDR_TO_PC_SLOTSTATUS;
-static struct rdr_to_pc_slot_status responseSlotStatus;
-static struct rdr_to_pc_data_block responseDataBlock;
-static struct rdr_to_pc_parameters_t0 responseParameters;
-uint8_t SendDataBlock[CCID_DATABLOCK_SIZE];
+ responseSlotStatus->bSlot = slot;
+ responseSlotStatus->bSeq = seq;
+ responseSlotStatus->bClockStatus = 0;
-uint8_t CALLBACK_CCID_GetSlotStatus(uint8_t slot, uint8_t* error) {
- if(slot == CCID_SLOT_INDEX) {
- *error = CCID_ERROR_NOERROR;
+ responseSlotStatus->dwLength = 0;
+
+ if(responseSlotStatus->bSlot == CCID_SLOT_INDEX) {
+ responseSlotStatus->bError = CCID_ERROR_NOERROR;
if(smartcard_inserted) {
- return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR | CCID_ICCSTATUS_PRESENTANDACTIVE;
+ responseSlotStatus->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_PRESENTANDACTIVE;
} else {
- return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR | CCID_ICCSTATUS_NOICCPRESENT;
+ responseSlotStatus->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_NOICCPRESENT;
}
} else {
- *error = CCID_ERROR_SLOTNOTFOUND;
- return CCID_COMMANDSTATUS_FAILED | CCID_ICCSTATUS_NOICCPRESENT;
+ responseSlotStatus->bError = CCID_ERROR_SLOTNOTFOUND;
+ responseSlotStatus->bStatus = CCID_COMMANDSTATUS_FAILED | CCID_ICCSTATUS_NOICCPRESENT;
}
}
-uint8_t
- CALLBACK_CCID_IccPowerOn(uint8_t slot, uint8_t* atrBuffer, uint32_t* atrlen, uint8_t* error) {
- if(slot == CCID_SLOT_INDEX) {
- *error = CCID_ERROR_NOERROR;
+void CALLBACK_CCID_SetParametersT0(
+ struct pc_to_rdr_set_parameters_t0* requestSetParametersT0,
+ struct rdr_to_pc_parameters_t0* responseSetParametersT0) {
+ furi_assert(requestSetParametersT0->bProtocolNum == 0x00); //T0
+ responseSetParametersT0->bMessageType = RDR_TO_PC_PARAMETERS;
+ responseSetParametersT0->bSlot = requestSetParametersT0->bSlot;
+ responseSetParametersT0->bSeq = requestSetParametersT0->bSeq;
+
+ responseSetParametersT0->dwLength =
+ sizeof(struct pc_to_rdr_set_parameters_t0) - sizeof(ccid_bulk_message_header_t);
+
+ if(responseSetParametersT0->bSlot == CCID_SLOT_INDEX) {
+ responseSetParametersT0->bError = CCID_ERROR_NOERROR;
+ if(smartcard_inserted) {
+ responseSetParametersT0->bProtocolNum = requestSetParametersT0->bProtocolNum;
+ responseSetParametersT0->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_PRESENTANDACTIVE;
+ } else {
+ responseSetParametersT0->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_NOICCPRESENT;
+ }
+ } else {
+ responseSetParametersT0->bError = CCID_ERROR_SLOTNOTFOUND;
+ responseSetParametersT0->bStatus = CCID_COMMANDSTATUS_FAILED | CCID_ICCSTATUS_NOICCPRESENT;
+ }
+}
+
+void CALLBACK_CCID_IccPowerOn(
+ uint8_t slot,
+ uint8_t seq,
+ struct rdr_to_pc_data_block* responseDataBlock) {
+ responseDataBlock->bMessageType = RDR_TO_PC_DATABLOCK;
+ responseDataBlock->dwLength = 0;
+ responseDataBlock->bSlot = slot;
+ responseDataBlock->bSeq = seq;
+
+ if(responseDataBlock->bSlot == CCID_SLOT_INDEX) {
+ responseDataBlock->bError = CCID_ERROR_NOERROR;
if(smartcard_inserted) {
if(callbacks[CCID_SLOT_INDEX] != NULL) {
- callbacks[CCID_SLOT_INDEX]->icc_power_on_callback(atrBuffer, atrlen, NULL);
+ callbacks[CCID_SLOT_INDEX]->icc_power_on_callback(
+ responseDataBlock->abData, &responseDataBlock->dwLength, NULL);
} else {
- return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
- CCID_ICCSTATUS_PRESENTANDINACTIVE;
+ responseDataBlock->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_PRESENTANDINACTIVE;
}
- return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR | CCID_ICCSTATUS_PRESENTANDACTIVE;
+ responseDataBlock->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_PRESENTANDACTIVE;
} else {
- return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR | CCID_ICCSTATUS_NOICCPRESENT;
+ responseDataBlock->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_NOICCPRESENT;
}
} else {
- *error = CCID_ERROR_SLOTNOTFOUND;
- return CCID_COMMANDSTATUS_FAILED | CCID_ICCSTATUS_NOICCPRESENT;
+ responseDataBlock->bError = CCID_ERROR_SLOTNOTFOUND;
+ responseDataBlock->bStatus = CCID_COMMANDSTATUS_FAILED | CCID_ICCSTATUS_NOICCPRESENT;
}
}
-uint8_t CALLBACK_CCID_XfrBlock(
- uint8_t slot,
- uint8_t* dataBlock,
- uint32_t* dataBlockLen,
- uint8_t* error) {
- if(slot == CCID_SLOT_INDEX) {
- *error = CCID_ERROR_NOERROR;
+void CALLBACK_CCID_XfrBlock(
+ struct pc_to_rdr_xfr_block* receivedXfrBlock,
+ struct rdr_to_pc_data_block* responseDataBlock) {
+ responseDataBlock->bMessageType = RDR_TO_PC_DATABLOCK;
+ responseDataBlock->bSlot = receivedXfrBlock->bSlot;
+ responseDataBlock->bSeq = receivedXfrBlock->bSeq;
+ responseDataBlock->bChainParameter = 0;
+
+ if(responseDataBlock->bSlot == CCID_SLOT_INDEX) {
+ responseDataBlock->bError = CCID_ERROR_NOERROR;
if(smartcard_inserted) {
if(callbacks[CCID_SLOT_INDEX] != NULL) {
- callbacks[CCID_SLOT_INDEX]->xfr_datablock_callback(dataBlock, dataBlockLen, NULL);
+ callbacks[CCID_SLOT_INDEX]->xfr_datablock_callback(
+ (const uint8_t*)receivedXfrBlock->abData,
+ receivedXfrBlock->dwLength,
+ responseDataBlock->abData,
+ &responseDataBlock->dwLength,
+ NULL);
} else {
- return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
- CCID_ICCSTATUS_PRESENTANDINACTIVE;
+ responseDataBlock->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_PRESENTANDINACTIVE;
}
- return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR | CCID_ICCSTATUS_PRESENTANDACTIVE;
+ responseDataBlock->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_PRESENTANDACTIVE;
} else {
- return CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR | CCID_ICCSTATUS_NOICCPRESENT;
+ responseDataBlock->bStatus = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR |
+ CCID_ICCSTATUS_NOICCPRESENT;
}
} else {
- *error = CCID_ERROR_SLOTNOTFOUND;
- return CCID_COMMANDSTATUS_FAILED | CCID_ICCSTATUS_NOICCPRESENT;
+ responseDataBlock->bError = CCID_ERROR_SLOTNOTFOUND;
+ responseDataBlock->bStatus = CCID_COMMANDSTATUS_FAILED | CCID_ICCSTATUS_NOICCPRESENT;
}
}
@@ -347,109 +407,89 @@ static void ccid_tx_ep_callback(usbd_device* dev, uint8_t event, uint8_t ep) {
if(event == usbd_evt_eprx) {
if(connected == false) return;
- struct ccid_bulk_message_header message;
- usbd_ep_read(usb_dev, ep, &message, sizeof(message));
-
- uint8_t Status;
- uint8_t Error = CCID_ERROR_NOERROR;
-
- uint32_t dataBlockLen = 0;
- uint8_t* dataBlockBuffer = NULL;
-
- if(message.bMessageType == PC_TO_RDR_GETSLOTSTATUS) {
- responseSlotStatus.bMessageType = RDR_TO_PC_SLOTSTATUS;
- responseSlotStatus.dwLength = 0;
- responseSlotStatus.bSlot = message.bSlot;
- responseSlotStatus.bSeq = message.bSeq;
-
- responseSlotStatus.bClockStatus = 0;
-
- Status = CALLBACK_CCID_GetSlotStatus(message.bSlot, &Error);
-
- responseSlotStatus.bStatus = Status;
- responseSlotStatus.bError = Error;
-
- usbd_ep_write(
- usb_dev, CCID_IN_EPADDR, &responseSlotStatus, sizeof(responseSlotStatus));
- } else if(message.bMessageType == PC_TO_RDR_ICCPOWERON) {
- responseDataBlock.bMessageType = RDR_TO_PC_DATABLOCK;
- responseDataBlock.bSlot = message.bSlot;
- responseDataBlock.bSeq = message.bSeq;
- responseDataBlock.bChainParameter = 0;
+ //read initial CCID message header
- dataBlockLen = 0;
- dataBlockBuffer = (uint8_t*)SendDataBlock;
- Status = CALLBACK_CCID_IccPowerOn(
- message.bSlot, (uint8_t*)dataBlockBuffer, &dataBlockLen, &Error);
+ int32_t bytes_read = usbd_ep_read(
+ usb_dev, ep, &ReceiveBuffer, sizeof(ccid_bulk_message_header_t) + CCID_DATABLOCK_SIZE);
+ //minimum request size is header size
+ furi_assert((uint16_t)bytes_read >= sizeof(ccid_bulk_message_header_t));
+ ccid_bulk_message_header_t* message = (ccid_bulk_message_header_t*)&ReceiveBuffer;
- furi_assert(dataBlockLen < CCID_DATABLOCK_SIZE);
- responseDataBlock.dwLength = dataBlockLen;
+ if(message->bMessageType == PC_TO_RDR_ICCPOWERON) {
+ struct pc_to_rdr_icc_power_on* requestDataBlock =
+ (struct pc_to_rdr_icc_power_on*)message;
+ struct rdr_to_pc_data_block* responseDataBlock =
+ (struct rdr_to_pc_data_block*)&SendBuffer;
- responseSlotStatus.bStatus = Status;
- responseSlotStatus.bError = Error;
+ CALLBACK_CCID_IccPowerOn(
+ requestDataBlock->bSlot, requestDataBlock->bSeq, responseDataBlock);
- memcpy(responseDataBlock.abData, SendDataBlock, dataBlockLen);
usbd_ep_write(
usb_dev,
CCID_IN_EPADDR,
- &responseDataBlock,
- sizeof(struct rdr_to_pc_data_block) + (sizeof(uint8_t) * dataBlockLen));
- } else if(message.bMessageType == PC_TO_RDR_ICCPOWEROFF) {
- responseSlotStatus.bMessageType = RDR_TO_PC_SLOTSTATUS;
- responseSlotStatus.dwLength = 0;
- responseSlotStatus.bSlot = message.bSlot;
- responseSlotStatus.bSeq = message.bSeq;
-
- responseSlotStatus.bClockStatus = 0;
+ responseDataBlock,
+ sizeof(struct rdr_to_pc_data_block) +
+ (sizeof(uint8_t) * responseDataBlock->dwLength));
+ } else if(message->bMessageType == PC_TO_RDR_ICCPOWEROFF) {
+ struct pc_to_rdr_icc_power_off* requestIccPowerOff =
+ (struct pc_to_rdr_icc_power_off*)message;
+ struct rdr_to_pc_slot_status* responseSlotStatus =
+ (struct rdr_to_pc_slot_status*)&SendBuffer;
+
+ CALLBACK_CCID_GetSlotStatus(
+ requestIccPowerOff->bSlot, requestIccPowerOff->bSeq, responseSlotStatus);
- uint8_t Status;
- uint8_t Error = CCID_ERROR_NOERROR;
- Status = CALLBACK_CCID_GetSlotStatus(message.bSlot, &Error);
+ usbd_ep_write(
+ usb_dev, CCID_IN_EPADDR, responseSlotStatus, sizeof(struct rdr_to_pc_slot_status));
+ } else if(message->bMessageType == PC_TO_RDR_GETSLOTSTATUS) {
+ struct pc_to_rdr_get_slot_status* requestSlotStatus =
+ (struct pc_to_rdr_get_slot_status*)message;
+ struct rdr_to_pc_slot_status* responseSlotStatus =
+ (struct rdr_to_pc_slot_status*)&SendBuffer;
- responseSlotStatus.bStatus = Status;
- responseSlotStatus.bError = Error;
+ CALLBACK_CCID_GetSlotStatus(
+ requestSlotStatus->bSlot, requestSlotStatus->bSeq, responseSlotStatus);
usbd_ep_write(
- usb_dev, CCID_IN_EPADDR, &responseSlotStatus, sizeof(responseSlotStatus));
- } else if(message.bMessageType == PC_TO_RDR_SETPARAMETERS) {
- responseParameters.bMessageType = RDR_TO_PC_PARAMETERS;
- responseParameters.bSlot = message.bSlot;
- responseParameters.bSeq = message.bSeq;
- responseParameters.bProtocolNum = 0; //T0
+ usb_dev, CCID_IN_EPADDR, responseSlotStatus, sizeof(struct rdr_to_pc_slot_status));
+ } else if(message->bMessageType == PC_TO_RDR_XFRBLOCK) {
+ struct pc_to_rdr_xfr_block* receivedXfrBlock = (struct pc_to_rdr_xfr_block*)message;
+ struct rdr_to_pc_data_block* responseDataBlock =
+ (struct rdr_to_pc_data_block*)&SendBuffer;
- uint8_t Status = CCID_COMMANDSTATUS_PROCESSEDWITHOUTERROR;
- uint8_t Error = CCID_ERROR_NOERROR;
+ furi_assert(receivedXfrBlock->dwLength <= CCID_DATABLOCK_SIZE);
+ furi_assert(
+ (uint16_t)bytes_read >=
+ sizeof(ccid_bulk_message_header_t) + receivedXfrBlock->dwLength);
- responseParameters.bStatus = Status;
- responseParameters.bError = Error;
+ CALLBACK_CCID_XfrBlock(receivedXfrBlock, responseDataBlock);
- responseParameters.dwLength = sizeof(struct rdr_to_pc_parameters_t0);
+ furi_assert(responseDataBlock->dwLength <= CCID_DATABLOCK_SIZE);
usbd_ep_write(
- usb_dev, CCID_IN_EPADDR, &responseParameters, sizeof(responseParameters));
- } else if(message.bMessageType == PC_TO_RDR_XFRBLOCK) {
- responseDataBlock.bMessageType = RDR_TO_PC_DATABLOCK;
- responseDataBlock.bSlot = message.bSlot;
- responseDataBlock.bSeq = message.bSeq;
- responseDataBlock.bChainParameter = 0;
-
- dataBlockLen = 0;
- dataBlockBuffer = (uint8_t*)SendDataBlock;
- Status = CALLBACK_CCID_XfrBlock(
- message.bSlot, (uint8_t*)dataBlockBuffer, &dataBlockLen, &Error);
-
- furi_assert(dataBlockLen < CCID_DATABLOCK_SIZE);
- responseDataBlock.dwLength = dataBlockLen;
-
- responseSlotStatus.bStatus = Status;
- responseSlotStatus.bError = Error;
+ usb_dev,
+ CCID_IN_EPADDR,
+ responseDataBlock,
+ sizeof(struct rdr_to_pc_data_block) +
+ (sizeof(uint8_t) * responseDataBlock->dwLength));
+ } else if(message->bMessageType == PC_TO_RDR_SETPARAMETERS) {
+ struct pc_to_rdr_set_parameters_t0* requestSetParametersT0 =
+ (struct pc_to_rdr_set_parameters_t0*)message;
+ struct rdr_to_pc_parameters_t0* responseSetParametersT0 =
+ (struct rdr_to_pc_parameters_t0*)&SendBuffer;
+
+ furi_assert(requestSetParametersT0->dwLength <= CCID_DATABLOCK_SIZE);
+ furi_assert(
+ (uint16_t)bytes_read >=
+ sizeof(ccid_bulk_message_header_t) + requestSetParametersT0->dwLength);
+
+ CALLBACK_CCID_SetParametersT0(requestSetParametersT0, responseSetParametersT0);
- memcpy(responseDataBlock.abData, SendDataBlock, dataBlockLen);
usbd_ep_write(
usb_dev,
CCID_IN_EPADDR,
- &responseDataBlock,
- sizeof(struct rdr_to_pc_data_block) + (sizeof(uint8_t) * dataBlockLen));
+ responseSetParametersT0,
+ sizeof(struct rdr_to_pc_parameters_t0));
}
}
}
diff --git a/firmware/targets/furi_hal_include/furi_hal_usb_ccid.h b/firmware/targets/furi_hal_include/furi_hal_usb_ccid.h
index e3ee0dfc38..a4880e4b6c 100644
--- a/firmware/targets/furi_hal_include/furi_hal_usb_ccid.h
+++ b/firmware/targets/furi_hal_include/furi_hal_usb_ccid.h
@@ -18,7 +18,12 @@ typedef struct {
typedef struct {
void (*icc_power_on_callback)(uint8_t* dataBlock, uint32_t* dataBlockLen, void* context);
- void (*xfr_datablock_callback)(uint8_t* dataBlock, uint32_t* dataBlockLen, void* context);
+ void (*xfr_datablock_callback)(
+ const uint8_t* dataBlock,
+ uint32_t dataBlockLen,
+ uint8_t* responseDataBlock,
+ uint32_t* responseDataBlockLen,
+ void* context);
} CcidCallbacks;
void furi_hal_ccid_set_callbacks(CcidCallbacks* cb);
From 38792f2c936934b63bf6e2c863c2c47095add177 Mon Sep 17 00:00:00 2001
From: h00die
Date: Mon, 9 Oct 2023 15:01:17 -0400
Subject: [PATCH 5/5] Fix spelling across some project files (#3128)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* codespell across project
Co-authored-by: あく
---
.../examples/example_apps_assets/README.md | 4 ++--
.../examples/example_apps_data/README.md | 4 ++--
.../example_plugins/plugin_interface.h | 2 +-
.../plugin_interface.h | 2 +-
.../examples/example_thermo/example_thermo.c | 11 +++++-----
.../bad_usb/helpers/ducky_script_commands.c | 2 +-
.../system/updater/util/update_task.c | 2 +-
documentation/AppsOnSDCard.md | 2 +-
.../file_formats/BadUsbScriptFormat.md | 10 ++++-----
lib/ST25RFAL002/doc/Release_Notes.html | 8 +++----
.../doc/ST25R3916_MisraComplianceReport.html | 4 ++--
lib/ST25RFAL002/include/rfal_analogConfig.h | 2 +-
lib/ST25RFAL002/include/rfal_dpo.h | 4 ++--
lib/ST25RFAL002/include/rfal_iso15693_2.h | 4 ++--
lib/ST25RFAL002/include/rfal_isoDep.h | 4 ++--
lib/ST25RFAL002/include/rfal_nfc.h | 6 ++---
lib/ST25RFAL002/include/rfal_nfcDep.h | 4 ++--
lib/ST25RFAL002/include/rfal_nfca.h | 6 ++---
lib/ST25RFAL002/include/rfal_nfcf.h | 12 +++++-----
lib/ST25RFAL002/include/rfal_t4t.h | 4 ++--
lib/ST25RFAL002/source/rfal_analogConfig.c | 2 +-
lib/ST25RFAL002/source/rfal_isoDep.c | 8 +++----
lib/ST25RFAL002/source/rfal_nfc.c | 20 ++++++++---------
lib/ST25RFAL002/source/rfal_st25tb.c | 2 +-
lib/ST25RFAL002/source/rfal_t4t.c | 2 +-
.../source/st25r3916/rfal_rfst25r3916.c | 22 +++++++++----------
lib/ST25RFAL002/source/st25r3916/st25r3916.c | 4 ++--
lib/ST25RFAL002/source/st25r3916/st25r3916.h | 4 ++--
.../source/st25r3916/st25r3916_com.h | 4 ++--
.../source/st25r3916/st25r3916_irq.h | 8 +++----
lib/fatfs/ff.c | 16 +++++++-------
scripts/flipper/assets/dolphin.py | 2 +-
scripts/fwflash.py | 2 +-
scripts/get_env.py | 6 ++---
scripts/toolchain/fbtenv.sh | 4 ++--
.../app_template/.github/workflows/build.yml | 2 +-
36 files changed, 102 insertions(+), 103 deletions(-)
diff --git a/applications/examples/example_apps_assets/README.md b/applications/examples/example_apps_assets/README.md
index a24183e88f..024c0877be 100644
--- a/applications/examples/example_apps_assets/README.md
+++ b/applications/examples/example_apps_assets/README.md
@@ -19,7 +19,7 @@ We recommend to use the `APP_ASSETS_PATH` macro to get the path to the Apps Asse
## What is the difference between the Apps Assets folder and the Apps Data folder?
-The Apps Assets folder is used to store the data provided with the application. For example, if you want to create a game, you can store game levels (contant data) in the Apps Assets folder.
+The Apps Assets folder is used to store the data provided with the application. For example, if you want to create a game, you can store game levels (content data) in the Apps Assets folder.
The Apps Data folder is used to store data generated by the application. For example, if you want to create a game, you can save the progress of the game (user-generated data) in the Apps Data folder.
@@ -55,4 +55,4 @@ When app is launched, the `files` folder will be unpacked to the Apps Assets fol
The data is unpacked when the application starts, if the application is launched for the first time, or if the data within the application is updated.
-When an application is compiled, the contents of the "files" folder are hashed and stored within the application itself. When the application starts, this hash is compared to the hash stored in the `.assets.signature` file. If the hashes differ or the `.assets.signature` file does not exist, the application folder is deleted and the new data is unpacked.
\ No newline at end of file
+When an application is compiled, the contents of the "files" folder are hashed and stored within the application itself. When the application starts, this hash is compared to the hash stored in the `.assets.signature` file. If the hashes differ or the `.assets.signature` file does not exist, the application folder is deleted and the new data is unpacked.
diff --git a/applications/examples/example_apps_data/README.md b/applications/examples/example_apps_data/README.md
index c70ac055a4..0e51daf18c 100644
--- a/applications/examples/example_apps_data/README.md
+++ b/applications/examples/example_apps_data/README.md
@@ -19,6 +19,6 @@ We recommend to use the `APP_DATA_PATH` macro to get the path to the Apps Data f
## What is the difference between the Apps Assets folder and the Apps Data folder?
-The Apps Assets folder is used to store the data provided with the application. For example, if you want to create a game, you can store game levels (contant data) in the Apps Assets folder.
+The Apps Assets folder is used to store the data provided with the application. For example, if you want to create a game, you can store game levels (content data) in the Apps Assets folder.
-The Apps Data folder is used to store data generated by the application. For example, if you want to create a game, you can save the progress of the game (user-generated data) in the Apps Data folder.
\ No newline at end of file
+The Apps Data folder is used to store data generated by the application. For example, if you want to create a game, you can save the progress of the game (user-generated data) in the Apps Data folder.
diff --git a/applications/examples/example_plugins/plugin_interface.h b/applications/examples/example_plugins/plugin_interface.h
index e24bc47bfb..25d95d2943 100644
--- a/applications/examples/example_plugins/plugin_interface.h
+++ b/applications/examples/example_plugins/plugin_interface.h
@@ -1,6 +1,6 @@
#pragma once
-/* Common interface between a plugin and host applicaion */
+/* Common interface between a plugin and host application */
#define PLUGIN_APP_ID "example_plugins"
#define PLUGIN_API_VERSION 1
diff --git a/applications/examples/example_plugins_advanced/plugin_interface.h b/applications/examples/example_plugins_advanced/plugin_interface.h
index e8b5a22d64..d99b335ff0 100644
--- a/applications/examples/example_plugins_advanced/plugin_interface.h
+++ b/applications/examples/example_plugins_advanced/plugin_interface.h
@@ -1,6 +1,6 @@
#pragma once
-/* Common interface between a plugin and host applicaion */
+/* Common interface between a plugin and host application */
#define PLUGIN_APP_ID "example_plugins_advanced"
#define PLUGIN_API_VERSION 1
diff --git a/applications/examples/example_thermo/example_thermo.c b/applications/examples/example_thermo/example_thermo.c
index 5cb8863a47..5abd963a19 100644
--- a/applications/examples/example_thermo/example_thermo.c
+++ b/applications/examples/example_thermo/example_thermo.c
@@ -90,7 +90,7 @@ static void example_thermo_request_temperature(ExampleThermoContext* context) {
bool success = false;
do {
/* Each communication with a 1-wire device starts by a reset.
- The functon will return true if a device responded with a presence pulse. */
+ The function will return true if a device responded with a presence pulse. */
if(!onewire_host_reset(onewire)) break;
/* After the reset, a ROM operation must follow.
If there is only one device connected, the "Skip ROM" command is most appropriate
@@ -130,7 +130,7 @@ static void example_thermo_read_temperature(ExampleThermoContext* context) {
size_t attempts_left = 10;
do {
/* Each communication with a 1-wire device starts by a reset.
- The functon will return true if a device responded with a presence pulse. */
+ The function will return true if a device responded with a presence pulse. */
if(!onewire_host_reset(onewire)) continue;
/* After the reset, a ROM operation must follow.
@@ -221,8 +221,7 @@ static void example_thermo_draw_callback(Canvas* canvas, void* ctx) {
canvas_draw_line(canvas, 0, 16, 128, 16);
canvas_set_font(canvas, FontSecondary);
- canvas_draw_str_aligned(
- canvas, middle_x, 30, AlignCenter, AlignBottom, "Connnect thermometer");
+ canvas_draw_str_aligned(canvas, middle_x, 30, AlignCenter, AlignBottom, "Connect thermometer");
snprintf(
text_store,
@@ -237,7 +236,7 @@ static void example_thermo_draw_callback(Canvas* canvas, void* ctx) {
float temp;
char temp_units;
- /* The applicaton is locale-aware.
+ /* The application is locale-aware.
Change Settings->System->Units to check it out. */
switch(locale_get_measurement_unit()) {
case LocaleMeasurementUnitsMetric:
@@ -355,7 +354,7 @@ int32_t example_thermo_main(void* p) {
/* Allocate all of the necessary structures */
ExampleThermoContext* context = example_thermo_context_alloc();
- /* Start the applicaton's main loop. It won't return until the application was requested to exit. */
+ /* Start the application's main loop. It won't return until the application was requested to exit. */
example_thermo_run(context);
/* Release all unneeded resources */
diff --git a/applications/main/bad_usb/helpers/ducky_script_commands.c b/applications/main/bad_usb/helpers/ducky_script_commands.c
index cc713135ee..a5bc7c8cf9 100644
--- a/applications/main/bad_usb/helpers/ducky_script_commands.c
+++ b/applications/main/bad_usb/helpers/ducky_script_commands.c
@@ -53,7 +53,7 @@ static int32_t ducky_fnc_string(BadUsbScript* bad_usb, const char* line, int32_t
furi_string_cat(bad_usb->string_print, "\n");
}
- if(bad_usb->stringdelay == 0) { // stringdelay not set - run command immidiately
+ if(bad_usb->stringdelay == 0) { // stringdelay not set - run command immediately
bool state = ducky_string(bad_usb, furi_string_get_cstr(bad_usb->string_print));
if(!state) {
return ducky_error(bad_usb, "Invalid string %s", line);
diff --git a/applications/system/updater/util/update_task.c b/applications/system/updater/util/update_task.c
index 74d752b434..df1793a800 100644
--- a/applications/system/updater/util/update_task.c
+++ b/applications/system/updater/util/update_task.c
@@ -137,7 +137,7 @@ static const struct {
.stage = UpdateTaskStageRadioBusy,
.percent_min = 11,
.percent_max = 20,
- .descr = "C2 FUS swich failed",
+ .descr = "C2 FUS switch failed",
},
{
.stage = UpdateTaskStageRadioBusy,
diff --git a/documentation/AppsOnSDCard.md b/documentation/AppsOnSDCard.md
index 051fbb84f5..f04793b4f4 100644
--- a/documentation/AppsOnSDCard.md
+++ b/documentation/AppsOnSDCard.md
@@ -14,7 +14,7 @@ To build your application as a FAP, create a folder with your app's source code
- To build your application, run `./fbt fap_{APPID}`, where APPID is your application's ID in its manifest.
- To build your app and upload it over USB to run on Flipper, use `./fbt launch APPSRC=applications_user/path/to/app`. This command is configured in the default [VS Code profile](../.vscode/ReadMe.md) as a "Launch App on Flipper" build action (Ctrl+Shift+B menu).
-- To build an app without uploading it to Flipper, use `./fbt build APPSRC=applications_user/path/to/app`. This command is also availabe in VSCode configuration as "Build App".
+- To build an app without uploading it to Flipper, use `./fbt build APPSRC=applications_user/path/to/app`. This command is also available in VSCode configuration as "Build App".
- To build all FAPs, run `./fbt faps` or `./fbt fap_dist`.
## FAP assets
diff --git a/documentation/file_formats/BadUsbScriptFormat.md b/documentation/file_formats/BadUsbScriptFormat.md
index 9cb848e2b7..1eb8eb5180 100644
--- a/documentation/file_formats/BadUsbScriptFormat.md
+++ b/documentation/file_formats/BadUsbScriptFormat.md
@@ -4,7 +4,7 @@ BadUsb app uses extended Duckyscript syntax. It is compatible with classic USB R
# Script file format
-BadUsb app can execute only text scrips from `.txt` files, no compilation is required. Both `\n` and `\r\n` line endings are supported. Empty lines are allowed. You can use spaces or tabs for line indentation.
+BadUsb app can execute only text scripts from `.txt` files, no compilation is required. Both `\n` and `\r\n` line endings are supported. Empty lines are allowed. You can use spaces or tabs for line indentation.
# Command set
@@ -72,10 +72,10 @@ Can be combined with a special key command or a single character.
## Key hold and release
Up to 5 keys can be hold simultaneously.
-| Command | Parameters | Notes |
-| ------- | ------------------------------- | ----------------------------------------- |
-| HOLD | Special key or single character | Press and hold key untill RELEASE command |
-| RELEASE | Special key or single character | Release key |
+| Command | Parameters | Notes |
+| ------- | ------------------------------- | ---------------------------------------- |
+| HOLD | Special key or single character | Press and hold key until RELEASE command |
+| RELEASE | Special key or single character | Release key |
## Wait for button press
diff --git a/lib/ST25RFAL002/doc/Release_Notes.html b/lib/ST25RFAL002/doc/Release_Notes.html
index c48e0a6c8c..28d501c091 100755
--- a/lib/ST25RFAL002/doc/Release_Notes.html
+++ b/lib/ST25RFAL002/doc/Release_Notes.html
@@ -199,7 +199,7 @@ Extended support for specific features of ST's ISO15693 Tags. New ST25Dx module added
Interrupt handling changed and further protection added
RFAL feature switches have been modified and features are now disabled if omitted
- ST25R3916 AAT (Automatic Antenna Tunning) module added
+ ST25R3916 AAT (Automatic Antenna Tuning) module added
RFAL NFC Higher layer added
Several driver improvements
@@ -286,12 +286,12 @@ Introduced a new IRQ status handling to read the registers only once
Several changes for supporting Linux platform
SPI Select/Deselect moved to platform.h
- Aditional protection of the IRQ status reading, new macros available: platformProtectST25R391xIrqStatus / platformUnprotectST25R391xIrqStatus
+ Additional protection of the IRQ status reading, new macros available: platformProtectST25R391xIrqStatus / platformUnprotectST25R391xIrqStatus
Renamed the IRQ Enable/Disable macros to platformProtectST25R391xComm / platformUnprotectST25R391xComm
Renamed SPI pins from chip specific to ST25R391X
Introduced a new option ST25R391X_COM_SINGLETXRX which executes SPI in one single exchange (additional buffer required)
Updated and added errata handlings to latest ST25R3911 Errata version
- Fixed inconsitency on Analog settings for NFC-V
+ Fixed inconsistency on Analog settings for NFC-V
Fixed issue on NFC-V 1of256 decoding
Changed the default NFC-A FDT Listen to be more strict
Added Wake-Up mode support
@@ -318,7 +318,7 @@ Provided with ST25R3911B Disco v1.1.12
Main Changes
- - EMD supression enabled for ST25R3911B
+ - EMD suppression enabled for ST25R3911B
diff --git a/lib/ST25RFAL002/doc/ST25R3916_MisraComplianceReport.html b/lib/ST25RFAL002/doc/ST25R3916_MisraComplianceReport.html
index 7076e7cc88..e4ffaa9336 100755
--- a/lib/ST25RFAL002/doc/ST25R3916_MisraComplianceReport.html
+++ b/lib/ST25RFAL002/doc/ST25R3916_MisraComplianceReport.html
@@ -237,7 +237,7 @@
Parent repository:
- RFAL informations:
+ RFAL information:
Path: .../ST25R3916_nucleo/rfal
Project repositories SHA1:
@@ -8087,7 +8087,7 @@ File: .../ST25R3916_nucleo/rfal/source/rfal_isoDep.c
- MISRA 10.5 - Layout of enum rfalIsoDepFSxI is guaranteed whithin 4bit range |
+ MISRA 10.5 - Layout of enum rfalIsoDepFSxI is guaranteed within 4bit range |
2526-2526 |
diff --git a/lib/ST25RFAL002/include/rfal_analogConfig.h b/lib/ST25RFAL002/include/rfal_analogConfig.h
index 009bc84842..de9db7be9c 100644
--- a/lib/ST25RFAL002/include/rfal_analogConfig.h
+++ b/lib/ST25RFAL002/include/rfal_analogConfig.h
@@ -337,7 +337,7 @@ ReturnCode rfalAnalogConfigListWriteRaw(const uint8_t* configTbl, uint16_t confi
*
* \param[in] more: 0x00 indicates it is last Configuration ID settings;
* 0x01 indicates more Configuration ID setting(s) are coming.
- * \param[in] *config: reference to the configuration list of current Configuraiton ID.
+ * \param[in] *config: reference to the configuration list of current Configuration ID.
*
* \return ERR_PARAM : if Configuration ID or parameter is invalid
* \return ERR_NOMEM : if LUT is full
diff --git a/lib/ST25RFAL002/include/rfal_dpo.h b/lib/ST25RFAL002/include/rfal_dpo.h
index e86c48db8a..7dd2cde5e2 100644
--- a/lib/ST25RFAL002/include/rfal_dpo.h
+++ b/lib/ST25RFAL002/include/rfal_dpo.h
@@ -81,7 +81,7 @@ typedef struct {
uint8_t dec; /*!< Threshold for decrementing the output power */
} rfalDpoEntry;
-/*! Function pointer to methode doing the reference measurement */
+/*! Function pointer to method doing the reference measurement */
typedef ReturnCode (*rfalDpoMeasureFunc)(uint8_t*);
/*
@@ -103,7 +103,7 @@ void rfalDpoInitialize(void);
/*!
*****************************************************************************
- * \brief Set the measurement methode
+ * \brief Set the measurement method
*
* This function sets the measurement method used for reference measurement.
* Based on the measurement the power will then be adjusted
diff --git a/lib/ST25RFAL002/include/rfal_iso15693_2.h b/lib/ST25RFAL002/include/rfal_iso15693_2.h
index 4ddb6b2be2..9949812050 100644
--- a/lib/ST25RFAL002/include/rfal_iso15693_2.h
+++ b/lib/ST25RFAL002/include/rfal_iso15693_2.h
@@ -186,8 +186,8 @@ extern ReturnCode iso15693VCDCode(
* \param[in] ignoreBits : number of bits in the beginning where collisions will be ignored
* \param[in] picopassMode : if set to true, the decoding will be according to Picopass
*
- * \return ERR_COLLISION : collision occured, data uncorrect
- * \return ERR_CRC : CRC error, data uncorrect
+ * \return ERR_COLLISION : collision occurred, data incorrect
+ * \return ERR_CRC : CRC error, data incorrect
* \return ERR_TIMEOUT : timeout waiting for data.
* \return ERR_NONE : No error.
*
diff --git a/lib/ST25RFAL002/include/rfal_isoDep.h b/lib/ST25RFAL002/include/rfal_isoDep.h
index 34bd6172a5..9b2d32c64d 100644
--- a/lib/ST25RFAL002/include/rfal_isoDep.h
+++ b/lib/ST25RFAL002/include/rfal_isoDep.h
@@ -616,7 +616,7 @@ bool rfalIsoDepIsAttrib(const uint8_t* buf, uint8_t bufLen);
* \param[in] atsParam : reference to ATS parameters
* \param[in] attribResParam : reference to ATTRIB_RES parameters
* \param[in] buf : reference to buffer containing RATS or ATTRIB
- * \param[in] bufLen : length in bytes of the given bufffer
+ * \param[in] bufLen : length in bytes of the given buffer
* \param[in] actParam : reference to incoming reception information will be placed
*
*
@@ -940,7 +940,7 @@ ReturnCode rfalIsoDepPollBHandleActivation(
*****************************************************************************
* \brief ISO-DEP Poller Handle S(Parameters)
*
- * This checks if PICC supports S(PARAMETERS), retieves PICC's
+ * This checks if PICC supports S(PARAMETERS), retrieves PICC's
* capabilities and sets the Bit Rate at the highest supported by both
* devices
*
diff --git a/lib/ST25RFAL002/include/rfal_nfc.h b/lib/ST25RFAL002/include/rfal_nfc.h
index 49cbe5f9cf..88a740a0a7 100644
--- a/lib/ST25RFAL002/include/rfal_nfc.h
+++ b/lib/ST25RFAL002/include/rfal_nfc.h
@@ -189,7 +189,7 @@ typedef struct {
/*! Discovery parameters */
typedef struct {
- rfalComplianceMode compMode; /*!< Compliancy mode to be used */
+ rfalComplianceMode compMode; /*!< Compliance mode to be used */
uint16_t techs2Find; /*!< Technologies to search for */
uint16_t totalDuration; /*!< Duration of a whole Poll + Listen cycle */
uint8_t devLimit; /*!< Max number of devices */
@@ -211,7 +211,7 @@ typedef struct {
bool wakeupConfigDefault; /*!< Wake-Up mode default configuration */
rfalWakeUpConfig wakeupConfig; /*!< Wake-Up mode configuration */
- bool activate_after_sak; // Set device to Active mode after SAK responce
+ bool activate_after_sak; // Set device to Active mode after SAK response
} rfalNfcDiscoverParam;
/*! Buffer union, only one interface is used at a time */
@@ -323,7 +323,7 @@ ReturnCode rfalNfcGetActiveDevice(rfalNfcDevice** dev);
*
* It selects the device to be activated.
* It shall be called when more than one device has been identified to
- * indiacte which device shall be actived
+ * indiacte which device shall be active
*
* \param[in] devIdx : device index to be activated
*
diff --git a/lib/ST25RFAL002/include/rfal_nfcDep.h b/lib/ST25RFAL002/include/rfal_nfcDep.h
index 8b33c6cc21..9cf770e53b 100644
--- a/lib/ST25RFAL002/include/rfal_nfcDep.h
+++ b/lib/ST25RFAL002/include/rfal_nfcDep.h
@@ -282,7 +282,7 @@ enum {
RFAL_NFCDEP_Bx_64_6780 = 0x08 /*!< Peer also supports 6780 */
};
-/*! Enumeration of NFC-DEP bit rate Dividor in PSL Digital 1.0 Table 100 */
+/*! Enumeration of NFC-DEP bit rate Divider in PSL Digital 1.0 Table 100 */
enum {
RFAL_NFCDEP_Dx_01_106 = RFAL_BR_106, /*!< Divisor D = 1 : bit rate = 106 */
RFAL_NFCDEP_Dx_02_212 = RFAL_BR_212, /*!< Divisor D = 2 : bit rate = 212 */
@@ -655,7 +655,7 @@ ReturnCode rfalNfcDepInitiatorHandleActivation(
*
* \param[in] buf : buffer holding Initiator's received request
* \param[in] bufLen : size of the msg contained on the buf in Bytes
- * \param[out] nfcid3 : pointer to where the NFCID3 may be outputed,
+ * \param[out] nfcid3 : pointer to where the NFCID3 may be outputted,
* nfcid3 has NFCF_SENSF_NFCID3_LEN as length
* Pass NULL if output parameter not desired
*
diff --git a/lib/ST25RFAL002/include/rfal_nfca.h b/lib/ST25RFAL002/include/rfal_nfca.h
index 2a265b16e3..4772586cbb 100644
--- a/lib/ST25RFAL002/include/rfal_nfca.h
+++ b/lib/ST25RFAL002/include/rfal_nfca.h
@@ -332,7 +332,7 @@ ReturnCode
* This method executes anti collision loop and select the device with higher NFCID1
*
* When devLimit = 0 it is configured to perform collision detection only. Once a collision
- * is detected the collision resolution is aborted immidiatly. If only one device is found
+ * is detected the collision resolution is aborted immediately. If only one device is found
* with no collisions, it will properly resolved.
*
* \param[in] devLimit : device limit value (CON_DEVICES_LIMIT)
@@ -374,7 +374,7 @@ ReturnCode rfalNfcaPollerSingleCollisionResolution(
*
*
* When devLimit = 0 it is configured to perform collision detection only. Once a collision
- * is detected the collision resolution is aborted immidiatly. If only one device is found
+ * is detected the collision resolution is aborted immediately. If only one device is found
* with no collisions, it will properly resolved.
*
*
@@ -436,7 +436,7 @@ ReturnCode rfalNfcaPollerSleepFullCollisionResolution(
*
*
* When devLimit = 0 it is configured to perform collision detection only. Once a collision
- * is detected the collision resolution is aborted immidiatly. If only one device is found
+ * is detected the collision resolution is aborted immediately. If only one device is found
* with no collisions, it will properly resolved.
*
*
diff --git a/lib/ST25RFAL002/include/rfal_nfcf.h b/lib/ST25RFAL002/include/rfal_nfcf.h
index d3dbfa3954..30c34765db 100644
--- a/lib/ST25RFAL002/include/rfal_nfcf.h
+++ b/lib/ST25RFAL002/include/rfal_nfcf.h
@@ -81,8 +81,8 @@
#define RFAL_NFCF_SENSF_PARAMS_TSN_POS 3U /*!< Time Slot Number position in the SENSF_REQ */
#define RFAL_NFCF_POLL_MAXCARDS 16U /*!< Max number slots/cards 16 */
-#define RFAL_NFCF_CMD_POS 0U /*!< Command/Responce code length */
-#define RFAL_NFCF_CMD_LEN 1U /*!< Command/Responce code length */
+#define RFAL_NFCF_CMD_POS 0U /*!< Command/Response code length */
+#define RFAL_NFCF_CMD_LEN 1U /*!< Command/Response code length */
#define RFAL_NFCF_LENGTH_LEN 1U /*!< LEN field length */
#define RFAL_NFCF_HEADER_LEN (RFAL_NFCF_LENGTH_LEN + RFAL_NFCF_CMD_LEN) /*!< Header length*/
@@ -315,8 +315,8 @@ ReturnCode rfalNfcfPollerCollisionResolution(
*****************************************************************************
* \brief NFC-F Poller Check/Read
*
- * It computes a Check / Read command accoring to T3T 1.0 and JIS X6319-4 and
- * sends it to PICC. If sucessfully, the rxBuf will contain the the number of
+ * It computes a Check / Read command according to T3T 1.0 and JIS X6319-4 and
+ * sends it to PICC. If successfully, the rxBuf will contain the the number of
* blocks in the first byte followed by the blocks data.
*
* \param[in] nfcid2 : nfcid2 of the device
@@ -344,7 +344,7 @@ ReturnCode rfalNfcfPollerCheck(
*****************************************************************************
* \brief NFC-F Poller Update/Write
*
- * It computes a Update / Write command accoring to T3T 1.0 and JIS X6319-4 and
+ * It computes a Update / Write command according to T3T 1.0 and JIS X6319-4 and
* sends it to PICC.
*
* \param[in] nfcid2 : nfcid2 of the device
@@ -381,7 +381,7 @@ ReturnCode rfalNfcfPollerUpdate(
*
* \param[in] buf : buffer holding Initiator's received command
* \param[in] bufLen : length of received command in bytes
- * \param[out] nfcid2 : pointer to where the NFCID2 may be outputed,
+ * \param[out] nfcid2 : pointer to where the NFCID2 may be outputted,
* nfcid2 has NFCF_SENSF_NFCID2_LEN as length
* Pass NULL if output parameter not desired
*
diff --git a/lib/ST25RFAL002/include/rfal_t4t.h b/lib/ST25RFAL002/include/rfal_t4t.h
index edee1cd8cd..454cad8e00 100644
--- a/lib/ST25RFAL002/include/rfal_t4t.h
+++ b/lib/ST25RFAL002/include/rfal_t4t.h
@@ -84,7 +84,7 @@
#define RFAL_T4T_ISO7816_P1_SELECT_BY_FILEID \
0x00U /*!< P1 value for Select by file identifier */
#define RFAL_T4T_ISO7816_P2_SELECT_FIRST_OR_ONLY_OCCURENCE \
- 0x00U /*!< b2b1 P2 value for First or only occurence */
+ 0x00U /*!< b2b1 P2 value for First or only occurrence */
#define RFAL_T4T_ISO7816_P2_SELECT_RETURN_FCI_TEMPLATE \
0x00U /*!< b4b3 P2 value for Return FCI template */
#define RFAL_T4T_ISO7816_P2_SELECT_NO_RESPONSE_DATA \
@@ -177,7 +177,7 @@ ReturnCode rfalT4TPollerComposeCAPDU(const rfalT4tCApduParam* apduParam);
* \brief T4T Parse R-APDU
*
* This method parses a R-APDU according to NFC Forum T4T and ISO7816-4.
- * It will extract the data length and check if the Satus word is expected.
+ * It will extract the data length and check if the Status word is expected.
*
* \param[in,out] apduParam : APDU parameters
* apduParam.rApduBodyLen will contain the data length
diff --git a/lib/ST25RFAL002/source/rfal_analogConfig.c b/lib/ST25RFAL002/source/rfal_analogConfig.c
index 1237af18bd..1058dd3285 100644
--- a/lib/ST25RFAL002/source/rfal_analogConfig.c
+++ b/lib/ST25RFAL002/source/rfal_analogConfig.c
@@ -30,7 +30,7 @@
*
* \author bkam
*
- * \brief Funcitons to manage and set analog settings.
+ * \brief Functions to manage and set analog settings.
*
*/
diff --git a/lib/ST25RFAL002/source/rfal_isoDep.c b/lib/ST25RFAL002/source/rfal_isoDep.c
index 77e67521dc..13674788e8 100644
--- a/lib/ST25RFAL002/source/rfal_isoDep.c
+++ b/lib/ST25RFAL002/source/rfal_isoDep.c
@@ -434,7 +434,7 @@
******************************************************************************
*/
-/*! Internal structure to be used in handling of S(PARAMETRS) only */
+/*! Internal structure to be used in handling of S(PARAMETERS) only */
typedef struct {
uint8_t pcb; /*!< PCB byte */
rfalIsoDepSParameter sParam; /*!< S(PARAMETERS) */
@@ -1053,7 +1053,7 @@ static ReturnCode isoDepDataExchangePCD(uint16_t* outActRxLen, bool* outIsChaini
}
return ERR_TIMEOUT; /* NFC Forum mandates timeout or transmission error depending on previous errors */
}
- } else /* Unexcpected R-Block */
+ } else /* Unexpected R-Block */
{
return ERR_PROTO;
}
@@ -1899,7 +1899,7 @@ static ReturnCode isoDepDataExchangePICC(void) {
return ERR_BUSY;
}
- /* Rule E - R(ACK) with not current bn -> toogle bn */
+ /* Rule E - R(ACK) with not current bn -> toggle bn */
isoDep_ToggleBN(gIsoDep.blockNumber);
/* This block has been transmitted and acknowledged, perform WTX until next data is provided */
@@ -2336,7 +2336,7 @@ ReturnCode rfalIsoDepPollAGetActivationStatus(void) {
rfalSetGT(rfalGetFDTPoll());
rfalFieldOnAndStartGT();
- /* Send RATS retransmission */ /* PRQA S 4342 1 # MISRA 10.5 - Layout of enum rfalIsoDepFSxI is guaranteed whithin 4bit range */
+ /* Send RATS retransmission */ /* PRQA S 4342 1 # MISRA 10.5 - Layout of enum rfalIsoDepFSxI is guaranteed within 4bit range */
EXIT_ON_ERR(
ret,
rfalIsoDepStartRATS(
diff --git a/lib/ST25RFAL002/source/rfal_nfc.c b/lib/ST25RFAL002/source/rfal_nfc.c
index 9040b7f9d2..57ff2e2358 100644
--- a/lib/ST25RFAL002/source/rfal_nfc.c
+++ b/lib/ST25RFAL002/source/rfal_nfc.c
@@ -90,14 +90,14 @@ typedef struct {
rfalNfcDevice* activeDev; /* Active device pointer */
rfalNfcDiscoverParam disc; /* Discovery parameters */
rfalNfcDevice devList[RFAL_NFC_MAX_DEVICES]; /*!< Location of device list */
- uint8_t devCnt; /* Decices found counter */
+ uint8_t devCnt; /* Devices found counter */
uint32_t discTmr; /* Discovery Total duration timer */
ReturnCode dataExErr; /* Last Data Exchange error */
bool discRestart; /* Restart discover after deactivation flag */
bool isRxChaining; /* Flag indicating Other device is chaining */
uint32_t lmMask; /* Listen Mode mask */
bool isTechInit; /* Flag indicating technology has been set */
- bool isOperOngoing; /* Flag indicating opration is ongoing */
+ bool isOperOngoing; /* Flag indicating operation is ongoing */
rfalNfcBuffer txBuf; /* Tx buffer for Data Exchange */
rfalNfcBuffer rxBuf; /* Rx buffer for Data Exchange */
@@ -674,7 +674,7 @@ ReturnCode rfalNfcDataExchangeStart(
break;
}
- /* If a transceive has succesfully started flag Data Exchange as ongoing */
+ /* If a transceive has successfuly started flag Data Exchange as ongoing */
if(err == ERR_NONE) {
gNfcDev.dataExErr = ERR_BUSY;
gNfcDev.state = RFAL_NFC_STATE_DATAEXCHANGE;
@@ -814,7 +814,7 @@ ReturnCode rfalNfcDataExchangeCustomStart(
break;
}
- /* If a transceive has succesfully started flag Data Exchange as ongoing */
+ /* If a transceive has successfuly started flag Data Exchange as ongoing */
if(err == ERR_NONE) {
gNfcDev.dataExErr = ERR_BUSY;
gNfcDev.state = RFAL_NFC_STATE_DATAEXCHANGE;
@@ -897,7 +897,7 @@ ReturnCode rfalNfcDataExchangeGetStatus(void) {
sizeof(gNfcDev.rxBuf.rfBuf),
&gNfcDev.rxLen));
- /* If set Sleep was succesfull keep restore the Sleep request signal */
+ /* If set Sleep was successful keep restore the Sleep request signal */
gNfcDev.dataExErr = ERR_SLEEP_REQ;
}
#endif /* RFAL_FEATURE_LISTEN_MODE */
@@ -924,7 +924,7 @@ static ReturnCode rfalNfcPollTechDetetection(void) {
err = ERR_NONE;
- /* Supress warning when specific RFAL features have been disabled */
+ /* Suppress warning when specific RFAL features have been disabled */
NO_WARNING(err);
/*******************************************************************************/
@@ -1154,7 +1154,7 @@ static ReturnCode rfalNfcPollCollResolution(void) {
err = ERR_NONE;
i = 0;
- /* Supress warning when specific RFAL features have been disabled */
+ /* Suppress warning when specific RFAL features have been disabled */
NO_WARNING(err);
NO_WARNING(devCnt);
NO_WARNING(i);
@@ -1415,7 +1415,7 @@ static ReturnCode rfalNfcPollActivation(uint8_t devIt) {
err = ERR_NONE;
- /* Supress warning when specific RFAL features have been disabled */
+ /* Suppress warning when specific RFAL features have been disabled */
NO_WARNING(err);
if(devIt > gNfcDev.devCnt) {
@@ -1428,7 +1428,7 @@ static ReturnCode rfalNfcPollActivation(uint8_t devIt) {
/*******************************************************************************/
#if RFAL_FEATURE_NFC_DEP
case RFAL_NFC_LISTEN_TYPE_AP2P:
- /* Activation has already been perfomed (ATR_REQ) */
+ /* Activation has already been performed (ATR_REQ) */
gNfcDev.devList[devIt].nfcid =
gNfcDev.devList[devIt].proto.nfcDep.activation.Target.ATR_RES.NFCID3;
@@ -1971,7 +1971,7 @@ static ReturnCode rfalNfcNfcDepActivate(
uint16_t atrReqLen) {
rfalNfcDepAtrParam initParam;
- /* Supress warnings if Listen mode is disabled */
+ /* Suppress warnings if Listen mode is disabled */
NO_WARNING(atrReq);
NO_WARNING(atrReqLen);
diff --git a/lib/ST25RFAL002/source/rfal_st25tb.c b/lib/ST25RFAL002/source/rfal_st25tb.c
index 6e110c91e7..00f699104b 100644
--- a/lib/ST25RFAL002/source/rfal_st25tb.c
+++ b/lib/ST25RFAL002/source/rfal_st25tb.c
@@ -509,7 +509,7 @@ ReturnCode rfalSt25tbPollerWriteBlock(uint8_t blockAddress, const rfalSt25tbBloc
return ret;
}
- /* If a transmission error occurred (maybe noise while commiting data) wait maximum programming time and verify data afterwards */
+ /* If a transmission error occurred (maybe noise while committing data) wait maximum programming time and verify data afterwards */
rfalSetGT((RFAL_ST25TB_FWT + RFAL_ST25TB_TW));
rfalFieldOnAndStartGT();
}
diff --git a/lib/ST25RFAL002/source/rfal_t4t.c b/lib/ST25RFAL002/source/rfal_t4t.c
index 8592daf8fb..4c29d79b02 100644
--- a/lib/ST25RFAL002/source/rfal_t4t.c
+++ b/lib/ST25RFAL002/source/rfal_t4t.c
@@ -113,7 +113,7 @@ ReturnCode rfalT4TPollerComposeCAPDU(const rfalT4tCApduParam* apduParam) {
/* Check if Data is present */
if(apduParam->LcFlag) {
if(apduParam->Lc == 0U) {
- /* Extented field coding not supported */
+ /* Extended field coding not supported */
return ERR_PARAM;
}
diff --git a/lib/ST25RFAL002/source/st25r3916/rfal_rfst25r3916.c b/lib/ST25RFAL002/source/st25r3916/rfal_rfst25r3916.c
index 0bad67a6db..7b8c243b13 100644
--- a/lib/ST25RFAL002/source/st25r3916/rfal_rfst25r3916.c
+++ b/lib/ST25RFAL002/source/st25r3916/rfal_rfst25r3916.c
@@ -52,7 +52,7 @@
/*
******************************************************************************
- * ENABLE SWITCHS
+ * ENABLE SWITCHES
******************************************************************************
*/
@@ -137,7 +137,7 @@ typedef struct {
/*! Struct that holds counters to control the FIFO on Tx and Rx */
typedef struct {
uint16_t
- expWL; /*!< The amount of bytes expected to be Tx when a WL interrupt occours */
+ expWL; /*!< The amount of bytes expected to be Tx when a WL interrupt occurs */
uint16_t
bytesTotal; /*!< Total bytes to be transmitted OR the total bytes received */
uint16_t
@@ -398,7 +398,7 @@ typedef union { /* PRQA S 0750 # MISRA 19.2 - Both members are of the same type
* ISO15693 2000 8.4 t1 MIN = 4192/fc
* ISO15693 2009 9.1 t1 MIN = 4320/fc
* Digital 2.1 B.5 FDTV,LISTEN,MIN = 4310/fc
- * Set FDT Listen one step earlier than on the more recent spec versions for greater interoprability
+ * Set FDT Listen one step earlier than on the more recent spec versions for greater interoperability
*/
#define RFAL_FDT_LISTEN_V_ADJUSTMENT 64U
@@ -1958,7 +1958,7 @@ static void rfalPrepareTransceive(void) {
ST25R3916_IRQ_MASK_WU_F); /* Enable external Field interrupts to detect Link Loss and SENF_REQ auto responses */
}
- /* In Active comms enable also External Field interrupts and set RF Collsion Avoindance */
+ /* In Active comms enable also External Field interrupts and set RF Collision Avoindance */
if(rfalIsModeActiveComm(gRFAL.mode)) {
maskInterrupts |=
(ST25R3916_IRQ_MASK_EOF | ST25R3916_IRQ_MASK_EON | ST25R3916_IRQ_MASK_PPON2 |
@@ -1990,7 +1990,7 @@ static void rfalTransceiveTx(void) {
uint16_t tmp;
ReturnCode ret;
- /* Supress warning in case NFC-V feature is disabled */
+ /* Suppress warning in case NFC-V feature is disabled */
ret = ERR_NONE;
NO_WARNING(ret);
@@ -2370,7 +2370,7 @@ static void rfalTransceiveRx(void) {
}
if((irqs & ST25R3916_IRQ_MASK_RX_REST) != 0U) {
- /* RX_REST indicates that Receiver has been reseted due to EMD, therefore a RXS + RXE should *
+ /* RX_REST indicates that Receiver has been reset due to EMD, therefore a RXS + RXE should *
* follow if a good reception is followed within the valid initial timeout */
/* Check whether NRT has expired already, if so signal a timeout */
@@ -2917,7 +2917,7 @@ ReturnCode rfalISO14443ATransceiveAnticollisionFrame(
}
/*******************************************************************************/
- /* Set speficic Analog Config for Anticolission if needed */
+ /* Set specific Analog Config for Anticolission if needed */
rfalSetAnalogConfig(
(RFAL_ANALOG_CONFIG_POLL | RFAL_ANALOG_CONFIG_TECH_NFCA |
RFAL_ANALOG_CONFIG_BITRATE_COMMON | RFAL_ANALOG_CONFIG_ANTICOL));
@@ -3030,7 +3030,7 @@ ReturnCode rfalISO15693TransceiveAnticollisionFrame(
}
/*******************************************************************************/
- /* Set speficic Analog Config for Anticolission if needed */
+ /* Set specific Analog Config for Anticolission if needed */
rfalSetAnalogConfig(
(RFAL_ANALOG_CONFIG_POLL | RFAL_ANALOG_CONFIG_TECH_NFCV |
RFAL_ANALOG_CONFIG_BITRATE_COMMON | RFAL_ANALOG_CONFIG_ANTICOL));
@@ -4053,7 +4053,7 @@ ReturnCode rfalListenSetState(rfalLmState newSt) {
ST25R3916_REG_AUX_DISPLAY,
ST25R3916_REG_AUX_DISPLAY_osc_ok,
ST25R3916_REG_AUX_DISPLAY_osc_ok)) {
- /* Wait for Oscilator ready */
+ /* Wait for Oscillator ready */
if(st25r3916WaitForInterruptsTimed(
ST25R3916_IRQ_MASK_OSC, ST25R3916_TOUT_OSC_STABLE) == 0U) {
ret = ERR_IO;
@@ -4074,7 +4074,7 @@ ReturnCode rfalListenSetState(rfalLmState newSt) {
* Ensure that when upper layer calls SetState(IDLE), it restores initial
* configuration and that check whether an external Field is still present */
if((gRFAL.Lm.mdMask & RFAL_LM_MASK_ACTIVE_P2P) != 0U) {
- /* Ensure nfc_ar is reseted and back to only after Rx */
+ /* Ensure nfc_ar is reset and back to only after Rx */
st25r3916ExecuteCommand(ST25R3916_CMD_STOP);
st25r3916ChangeRegisterBits(
ST25R3916_REG_MODE,
@@ -4443,7 +4443,7 @@ static uint16_t rfalWakeUpModeFilter(uint16_t curRef, uint16_t curVal, uint8_t w
/* Perform the averaging|filter as describded in ST25R3916 DS */
- /* Avoid signed arithmetics by spliting in two cases */
+ /* Avoid signed arithmetics by splitting in two cases */
if(curVal > curRef) {
newRef = curRef + ((curVal - curRef) / weight);
diff --git a/lib/ST25RFAL002/source/st25r3916/st25r3916.c b/lib/ST25RFAL002/source/st25r3916/st25r3916.c
index 6d8e07b1ab..9b6c22bff6 100644
--- a/lib/ST25RFAL002/source/st25r3916/st25r3916.c
+++ b/lib/ST25RFAL002/source/st25r3916/st25r3916.c
@@ -274,7 +274,7 @@ ReturnCode st25r3916Initialize(void) {
void st25r3916Deinitialize(void) {
st25r3916DisableInterrupts(ST25R3916_IRQ_MASK_ALL);
- /* Disabe Tx and Rx, Keep OSC On */
+ /* Disable Tx and Rx, Keep OSC On */
st25r3916TxRxOff();
return;
@@ -418,7 +418,7 @@ ReturnCode st25r3916CalibrateCapacitiveSensor(uint8_t* result) {
ST25R3916_TOUT_CALIBRATE_CAP_SENSOR,
&res);
- /* Check wether the calibration was successull */
+ /* Check whether the calibration was successull */
if(((res & ST25R3916_REG_CAP_SENSOR_RESULT_cs_cal_end) !=
ST25R3916_REG_CAP_SENSOR_RESULT_cs_cal_end) ||
((res & ST25R3916_REG_CAP_SENSOR_RESULT_cs_cal_err) ==
diff --git a/lib/ST25RFAL002/source/st25r3916/st25r3916.h b/lib/ST25RFAL002/source/st25r3916/st25r3916.h
index d546d79e31..2ba202d86d 100644
--- a/lib/ST25RFAL002/source/st25r3916/st25r3916.h
+++ b/lib/ST25RFAL002/source/st25r3916/st25r3916.h
@@ -117,7 +117,7 @@ struct st25r3916StreamConfig {
#define ST25R3916_CMD_AM_MOD_STATE_CHANGE \
0xD2U /*!< AM Modulation state change */
#define ST25R3916_CMD_MEASURE_AMPLITUDE \
- 0xD3U /*!< Measure singal amplitude on RFI inputs */
+ 0xD3U /*!< Measure signal amplitude on RFI inputs */
#define ST25R3916_CMD_RESET_RXGAIN \
0xD5U /*!< Reset RX Gain */
#define ST25R3916_CMD_ADJUST_REGULATORS \
@@ -299,7 +299,7 @@ ReturnCode st25r3916SetBitrate(uint8_t txrate, uint8_t rxrate);
*
* This function the power level is measured in maximum load conditions and
* the regulated voltage reference is set to 250mV below this level.
- * Execution of this function lasts arround 5ms.
+ * Execution of this function lasts around 5ms.
*
* The regulated voltages will be set to the result of Adjust Regulators
*
diff --git a/lib/ST25RFAL002/source/st25r3916/st25r3916_com.h b/lib/ST25RFAL002/source/st25r3916/st25r3916_com.h
index 726758c83d..6a47317e37 100644
--- a/lib/ST25RFAL002/source/st25r3916/st25r3916_com.h
+++ b/lib/ST25RFAL002/source/st25r3916/st25r3916_com.h
@@ -1053,7 +1053,7 @@ ReturnCode st25r3916ReadRegister(uint8_t reg, uint8_t* val);
* auto-increment feature. That is, after each read the address pointer
* inside the ST25R3916 gets incremented automatically.
*
- * \param[in] reg: Address of the frist register to read from.
+ * \param[in] reg: Address of the first register to read from.
* \param[in] values: pointer to a buffer where the result shall be written to.
* \param[in] length: Number of registers to be read out.
*
@@ -1088,7 +1088,7 @@ ReturnCode st25r3916WriteRegister(uint8_t reg, uint8_t val);
* auto-increment feature. That is, after each write the address pointer
* inside the ST25R3916 gets incremented automatically.
*
- * \param[in] reg: Address of the frist register to write.
+ * \param[in] reg: Address of the first register to write.
* \param[in] values: pointer to a buffer containing the values to be written.
* \param[in] length: Number of values to be written.
*
diff --git a/lib/ST25RFAL002/source/st25r3916/st25r3916_irq.h b/lib/ST25RFAL002/source/st25r3916/st25r3916_irq.h
index 2433173718..e8ce2d07a5 100644
--- a/lib/ST25RFAL002/source/st25r3916/st25r3916_irq.h
+++ b/lib/ST25RFAL002/source/st25r3916/st25r3916_irq.h
@@ -161,7 +161,7 @@
* \param[in] tmo : time in milliseconds until timeout occurs. If set to 0
* the functions waits forever.
*
- * \return : 0 if timeout occured otherwise a mask indicating the cleared
+ * \return : 0 if timeout occurred otherwise a mask indicating the cleared
* interrupts.
*
*****************************************************************************
@@ -173,7 +173,7 @@ uint32_t st25r3916WaitForInterruptsTimed(uint32_t mask, uint16_t tmo);
* \brief Get status for the given interrupt
*
* This function is used to check whether the interrupt given by \a mask
- * has occured. If yes the interrupt gets cleared. This function returns
+ * has occurred. If yes the interrupt gets cleared. This function returns
* only status bits which are inside \a mask.
*
* \param[in] mask : mask indicating the interrupt to check for.
@@ -189,7 +189,7 @@ uint32_t st25r3916GetInterrupt(uint32_t mask);
* \brief Init the 3916 interrupt
*
* This function is used to check whether the interrupt given by \a mask
- * has occured.
+ * has occurred.
*
*****************************************************************************
*/
@@ -220,7 +220,7 @@ void st25r3916CheckForReceivedInterrupts(void);
*****************************************************************************
* \brief ISR Service routine
*
- * This function modiefies the interupt
+ * This function modiefies the interrupt
*****************************************************************************
*/
void st25r3916Isr(void);
diff --git a/lib/fatfs/ff.c b/lib/fatfs/ff.c
index d390895788..86646c32ca 100644
--- a/lib/fatfs/ff.c
+++ b/lib/fatfs/ff.c
@@ -1927,7 +1927,7 @@ DWORD xsum32 (
static
void get_xdir_info (
- BYTE* dirb, /* Pointer to the direcotry entry block 85+C0+C1s */
+ BYTE* dirb, /* Pointer to the directory entry block 85+C0+C1s */
FILINFO* fno /* Buffer to store the extracted file information */
)
{
@@ -1971,17 +1971,17 @@ void get_xdir_info (
/*-----------------------------------*/
-/* exFAT: Get a directry entry block */
+/* exFAT: Get a directory entry block */
/*-----------------------------------*/
static
FRESULT load_xdir ( /* FR_INT_ERR: invalid entry block */
- DIR* dp /* Pointer to the reading direcotry object pointing the 85 entry */
+ DIR* dp /* Pointer to the reading directory object pointing the 85 entry */
)
{
FRESULT res;
UINT i, sz_ent;
- BYTE* dirb = dp->obj.fs->dirbuf; /* Pointer to the on-memory direcotry entry block 85+C0+C1s */
+ BYTE* dirb = dp->obj.fs->dirbuf; /* Pointer to the on-memory directory entry block 85+C0+C1s */
/* Load 85 entry */
@@ -2026,7 +2026,7 @@ FRESULT load_xdir ( /* FR_INT_ERR: invalid entry block */
/*------------------------------------------------*/
static
FRESULT load_obj_dir (
- DIR* dp, /* Blank directory object to be used to access containing direcotry */
+ DIR* dp, /* Blank directory object to be used to access containing directory */
const _FDID* obj /* Object with its containing directory information */
)
{
@@ -2054,12 +2054,12 @@ FRESULT load_obj_dir (
/*-----------------------------------------------*/
static
FRESULT store_xdir (
- DIR* dp /* Pointer to the direcotry object */
+ DIR* dp /* Pointer to the directory object */
)
{
FRESULT res;
UINT nent;
- BYTE* dirb = dp->obj.fs->dirbuf; /* Pointer to the direcotry entry block 85+C0+C1s */
+ BYTE* dirb = dp->obj.fs->dirbuf; /* Pointer to the directory entry block 85+C0+C1s */
/* Create set sum */
st_word(dirb + XDIR_SetSum, xdir_sum(dirb));
@@ -2087,7 +2087,7 @@ FRESULT store_xdir (
static
void create_xdir (
- BYTE* dirb, /* Pointer to the direcotry entry block buffer */
+ BYTE* dirb, /* Pointer to the directory entry block buffer */
const WCHAR* lfn /* Pointer to the nul terminated file name */
)
{
diff --git a/scripts/flipper/assets/dolphin.py b/scripts/flipper/assets/dolphin.py
index b4a53a62df..e9089a1b99 100644
--- a/scripts/flipper/assets/dolphin.py
+++ b/scripts/flipper/assets/dolphin.py
@@ -267,7 +267,7 @@ def load(self, source_directory: str):
# Load animation data
while True:
try:
- # Read animation spcification
+ # Read animation specification
name = file.readKey("Name")
min_butthurt = file.readKeyInt("Min butthurt")
max_butthurt = file.readKeyInt("Max butthurt")
diff --git a/scripts/fwflash.py b/scripts/fwflash.py
index 6948bd7f51..00a76322d4 100755
--- a/scripts/fwflash.py
+++ b/scripts/fwflash.py
@@ -462,7 +462,7 @@ def flash(self):
available_interfaces = self._search_interface(network_flash_interfaces)
if not available_interfaces:
- self.logger.error("No availiable interfaces")
+ self.logger.error("No available interfaces")
return 1
elif len(available_interfaces) > 1:
self.logger.error("Multiple interfaces found:")
diff --git a/scripts/get_env.py b/scripts/get_env.py
index 5403bafeb2..e8f6b3b77f 100755
--- a/scripts/get_env.py
+++ b/scripts/get_env.py
@@ -72,10 +72,10 @@ def get_details(event, args):
def add_env(name, value, file):
- delimeter = id_gen()
- print(f"{name}<<{delimeter}", file=file)
+ delimiter = id_gen()
+ print(f"{name}<<{delimiter}", file=file)
print(f"{value}", file=file)
- print(f"{delimeter}", file=file)
+ print(f"{delimiter}", file=file)
def add_set_output_var(name, value, file):
diff --git a/scripts/toolchain/fbtenv.sh b/scripts/toolchain/fbtenv.sh
index c5040ed81e..990776b27a 100755
--- a/scripts/toolchain/fbtenv.sh
+++ b/scripts/toolchain/fbtenv.sh
@@ -89,7 +89,7 @@ fbtenv_check_sourced()
setopt +o nomatch; # disabling 'no match found' warning in zsh
return 0;;
esac
- if [ ${0##*/} = "fbtenv.sh" ]; then # exluding script itself
+ if [ ${0##*/} = "fbtenv.sh" ]; then # excluding script itself
fbtenv_show_usage;
return 1;
fi
@@ -163,7 +163,7 @@ fbtenv_check_rosetta()
if [ "$ARCH_TYPE" = "arm64" ]; then
if ! pgrep -q oahd; then
echo "Flipper Zero Toolchain needs Rosetta2 to run under Apple Silicon";
- echo "Please instal it by typing 'softwareupdate --install-rosetta --agree-to-license'";
+ echo "Please install it by typing 'softwareupdate --install-rosetta --agree-to-license'";
return 1;
fi
fi
diff --git a/scripts/ufbt/project_template/app_template/.github/workflows/build.yml b/scripts/ufbt/project_template/app_template/.github/workflows/build.yml
index 0834f83798..c11ffc180f 100644
--- a/scripts/ufbt/project_template/app_template/.github/workflows/build.yml
+++ b/scripts/ufbt/project_template/app_template/.github/workflows/build.yml
@@ -5,7 +5,7 @@ name: "FAP: Build for multiple SDK sources"
on:
push:
- ## put your main branch name under "braches"
+ ## put your main branch name under "branches"
#branches:
# - master
pull_request: