Browse Source

Fix typos in source code (#2258)

yan0f 3 years ago
parent
commit
9740dd8c75

+ 1 - 1
applications/debug/unit_tests/stream/stream_test.c

@@ -95,7 +95,7 @@ MU_TEST_1(stream_composite_subtest, Stream* stream) {
     mu_check(stream_seek_to_char(stream, '1', StreamDirectionBackward));
     mu_check(stream_seek_to_char(stream, '1', StreamDirectionBackward));
     mu_check(stream_tell(stream) == 0);
     mu_check(stream_tell(stream) == 0);
 
 
-    // write string with replacemet
+    // write string with replacement
     // "1337_69" -> "1337lee"
     // "1337_69" -> "1337lee"
     mu_check(stream_seek(stream, 4, StreamOffsetFromStart));
     mu_check(stream_seek(stream, 4, StreamOffsetFromStart));
     mu_check(stream_write_string(stream, string_lee) == 3);
     mu_check(stream_write_string(stream, string_lee) == 3);

+ 1 - 1
lib/ST25RFAL002/include/rfal_isoDep.h

@@ -857,7 +857,7 @@ ReturnCode rfalIsoDepATTRIB(
  *  \brief  Deselects PICC
  *  \brief  Deselects PICC
  *
  *
  *  This function sends a deselect command to PICC and waits for it`s
  *  This function sends a deselect command to PICC and waits for it`s
- *  responce in a blocking way
+ *  response in a blocking way
  *
  *
  *  \return ERR_NONE   : Deselect successfully sent and acknowledged by PICC 
  *  \return ERR_NONE   : Deselect successfully sent and acknowledged by PICC 
  *  \return ERR_TIMEOUT: No response rcvd from PICC 
  *  \return ERR_TIMEOUT: No response rcvd from PICC 

+ 1 - 1
lib/ST25RFAL002/include/rfal_t4t.h

@@ -88,7 +88,7 @@
 #define RFAL_T4T_ISO7816_P2_SELECT_RETURN_FCI_TEMPLATE \
 #define RFAL_T4T_ISO7816_P2_SELECT_RETURN_FCI_TEMPLATE \
     0x00U /*!< b4b3      P2 value for Return FCI template                      */
     0x00U /*!< b4b3      P2 value for Return FCI template                      */
 #define RFAL_T4T_ISO7816_P2_SELECT_NO_RESPONSE_DATA \
 #define RFAL_T4T_ISO7816_P2_SELECT_NO_RESPONSE_DATA \
-    0x0CU /*!< b4b3      P2 value for No responce data                         */
+    0x0CU /*!< b4b3      P2 value for No response data                         */
 
 
 #define RFAL_T4T_ISO7816_STATUS_COMPLETE \
 #define RFAL_T4T_ISO7816_STATUS_COMPLETE \
     0x9000U /*!< Command completed \ Normal processing - No further qualification*/
     0x9000U /*!< Command completed \ Normal processing - No further qualification*/

+ 2 - 2
lib/fatfs/ff.c

@@ -3975,7 +3975,7 @@ FRESULT f_getcwd (
 #endif
 #endif
 			if (i == len) {					/* Root-directory */
 			if (i == len) {					/* Root-directory */
 				*tp++ = '/';
 				*tp++ = '/';
-			} else {						/* Sub-directroy */
+			} else {						/* Sub-directory */
 				do		/* Add stacked path str */
 				do		/* Add stacked path str */
 					*tp++ = buff[i++];
 					*tp++ = buff[i++];
 				while (i < len);
 				while (i < len);
@@ -4673,7 +4673,7 @@ FRESULT f_mkdir (
 				}
 				}
 			}
 			}
 			if (res == FR_OK) {
 			if (res == FR_OK) {
-				res = dir_register(&dj);	/* Register the object to the directoy */
+				res = dir_register(&dj);	/* Register the object to the directory */
 			}
 			}
 			if (res == FR_OK) {
 			if (res == FR_OK) {
 #if _FS_EXFAT
 #if _FS_EXFAT

+ 1 - 1
lib/infrared/encoder_decoder/infrared.h

@@ -10,7 +10,7 @@ extern "C" {
 #define INFRARED_COMMON_CARRIER_FREQUENCY ((uint32_t)38000)
 #define INFRARED_COMMON_CARRIER_FREQUENCY ((uint32_t)38000)
 #define INFRARED_COMMON_DUTY_CYCLE ((float)0.33)
 #define INFRARED_COMMON_DUTY_CYCLE ((float)0.33)
 
 
-/* if we want to see splitted raw signals during brutforce,
+/* if we want to see split raw signals during bruteforce,
  * we have to have RX raw timing delay less than TX */
  * we have to have RX raw timing delay less than TX */
 #define INFRARED_RAW_RX_TIMING_DELAY_US 150000
 #define INFRARED_RAW_RX_TIMING_DELAY_US 150000
 #define INFRARED_RAW_TX_TIMING_DELAY_US 180000
 #define INFRARED_RAW_TX_TIMING_DELAY_US 180000

+ 1 - 1
lib/lfrfid/protocols/protocol_pyramid.c

@@ -88,7 +88,7 @@ static bool protocol_pyramid_can_be_decoded(uint8_t* data) {
     }
     }
     uint8_t fmt_len = 105 - j;
     uint8_t fmt_len = 105 - j;
 
 
-    // Only suppport 26bit format for now
+    // Only support 26bit format for now
     if(fmt_len != 26) return false;
     if(fmt_len != 26) return false;
 
 
     return true;
     return true;

+ 2 - 2
lib/nfc/nfc_device.c

@@ -856,7 +856,7 @@ static bool nfc_device_load_mifare_classic_data(FlipperFormat* file, NfcDevice*
         bool old_format = false;
         bool old_format = false;
         // Read Mifare Classic format version
         // Read Mifare Classic format version
         if(!flipper_format_read_uint32(file, "Data format version", &data_format_version, 1)) {
         if(!flipper_format_read_uint32(file, "Data format version", &data_format_version, 1)) {
-            // Load unread sectors with zero keys access for backward compatability
+            // Load unread sectors with zero keys access for backward compatibility
             if(!flipper_format_rewind(file)) break;
             if(!flipper_format_rewind(file)) break;
             old_format = true;
             old_format = true;
         } else {
         } else {
@@ -1125,7 +1125,7 @@ static bool nfc_device_load_data(NfcDevice* dev, FuriString* path, bool show_dia
     }
     }
 
 
     do {
     do {
-        // Check existance of shadow file
+        // Check existence of shadow file
         nfc_device_get_shadow_path(path, temp_str);
         nfc_device_get_shadow_path(path, temp_str);
         dev->shadow_file_exist =
         dev->shadow_file_exist =
             storage_common_stat(dev->storage, furi_string_get_cstr(temp_str), NULL) == FSE_OK;
             storage_common_stat(dev->storage, furi_string_get_cstr(temp_str), NULL) == FSE_OK;

+ 1 - 1
lib/nfc/parsers/plantain_4k_parser.c

@@ -106,7 +106,7 @@ bool plantain_4k_parser_parse(NfcDeviceData* dev_data) {
     // Point to block 0 of sector 0, value 0
     // Point to block 0 of sector 0, value 0
     temp_ptr = &data->block[0 * 4].value[0];
     temp_ptr = &data->block[0 * 4].value[0];
     // Read first 7 bytes of block 0 of sector 0 from last to first and convert them to uint64_t
     // Read first 7 bytes of block 0 of sector 0 from last to first and convert them to uint64_t
-    // 80 5C 23 8A 16 31 04 becomes 04 31 16 8A 23 5C 80, and equals to 36130104729284868 decimal
+    // 04 31 16 8A 23 5C 80 becomes 80 5C 23 8A 16 31 04, and equals to 36130104729284868 decimal
     uint8_t card_number_arr[7];
     uint8_t card_number_arr[7];
     for(size_t i = 0; i < 7; i++) {
     for(size_t i = 0; i < 7; i++) {
         card_number_arr[i] = temp_ptr[6 - i];
         card_number_arr[i] = temp_ptr[6 - i];

+ 1 - 1
lib/nfc/parsers/plantain_parser.c

@@ -79,7 +79,7 @@ bool plantain_parser_parse(NfcDeviceData* dev_data) {
     // Point to block 0 of sector 0, value 0
     // Point to block 0 of sector 0, value 0
     temp_ptr = &data->block[0 * 4].value[0];
     temp_ptr = &data->block[0 * 4].value[0];
     // Read first 7 bytes of block 0 of sector 0 from last to first and convert them to uint64_t
     // Read first 7 bytes of block 0 of sector 0 from last to first and convert them to uint64_t
-    // 80 5C 23 8A 16 31 04 becomes 04 31 16 8A 23 5C 80, and equals to 36130104729284868 decimal
+    // 04 31 16 8A 23 5C 80 becomes 80 5C 23 8A 16 31 04, and equals to 36130104729284868 decimal
     uint8_t card_number_arr[7];
     uint8_t card_number_arr[7];
     for(size_t i = 0; i < 7; i++) {
     for(size_t i = 0; i < 7; i++) {
         card_number_arr[i] = temp_ptr[6 - i];
         card_number_arr[i] = temp_ptr[6 - i];

+ 1 - 1
lib/nfc/parsers/two_cities.c

@@ -107,7 +107,7 @@ bool two_cities_parser_parse(NfcDeviceData* dev_data) {
     // Point to block 0 of sector 0, value 0
     // Point to block 0 of sector 0, value 0
     temp_ptr = &data->block[0 * 4].value[0];
     temp_ptr = &data->block[0 * 4].value[0];
     // Read first 7 bytes of block 0 of sector 0 from last to first and convert them to uint64_t
     // Read first 7 bytes of block 0 of sector 0 from last to first and convert them to uint64_t
-    // 80 5C 23 8A 16 31 04 becomes 04 31 16 8A 23 5C 80, and equals to 36130104729284868 decimal
+    // 04 31 16 8A 23 5C 80 becomes 80 5C 23 8A 16 31 04, and equals to 36130104729284868 decimal
     uint8_t card_number_arr[7];
     uint8_t card_number_arr[7];
     for(size_t i = 0; i < 7; i++) {
     for(size_t i = 0; i < 7; i++) {
         card_number_arr[i] = temp_ptr[6 - i];
         card_number_arr[i] = temp_ptr[6 - i];

+ 1 - 1
lib/one_wire/ibutton/protocols/protocol_cyfral.c

@@ -181,7 +181,7 @@ static bool protocol_cyfral_decoder_feed(ProtocolCyfral* proto, bool level, uint
                     cyfral->index++;
                     cyfral->index++;
                 }
                 }
 
 
-                // succefully read 8 nibbles
+                // successfully read 8 nibbles
                 if(cyfral->index == 8) {
                 if(cyfral->index == 8) {
                     cyfral->state = CYFRAL_READ_STOP_NIBBLE;
                     cyfral->state = CYFRAL_READ_STOP_NIBBLE;
                 }
                 }

+ 1 - 1
lib/subghz/environment.h

@@ -26,7 +26,7 @@ void subghz_environment_free(SubGhzEnvironment* instance);
  * Downloading the manufacture key file.
  * Downloading the manufacture key file.
  * @param instance Pointer to a SubGhzEnvironment instance
  * @param instance Pointer to a SubGhzEnvironment instance
  * @param filename Full path to the file
  * @param filename Full path to the file
- * @return true On succes
+ * @return true On success
  */
  */
 bool subghz_environment_load_keystore(SubGhzEnvironment* instance, const char* filename);
 bool subghz_environment_load_keystore(SubGhzEnvironment* instance, const char* filename);
 
 

+ 1 - 1
scripts/flipper/assets/icon.py

@@ -104,7 +104,7 @@ def file2image(file):
     data_enc = bytearray(data_encoded_str)
     data_enc = bytearray(data_encoded_str)
     data_enc = bytearray([len(data_enc) & 0xFF, len(data_enc) >> 8]) + data_enc
     data_enc = bytearray([len(data_enc) & 0xFF, len(data_enc) >> 8]) + data_enc
 
 
-    # Use encoded data only if its lenght less than original, including header
+    # Use encoded data only if its length less than original, including header
     if len(data_enc) < len(data_bin) + 1:
     if len(data_enc) < len(data_bin) + 1:
         data = b"\x01\x00" + data_enc
         data = b"\x01\x00" + data_enc
     else:
     else: