Просмотр исходного кода

Merge spi_mem_manager from https://github.com/flipperdevices/flipperzero-good-faps

Willy-JL 2 лет назад
Родитель
Сommit
c90c31c0fd

+ 2 - 0
spi_mem_manager/.catalog/changelog.md

@@ -1,3 +1,5 @@
+## 1.2
+   Added support for the XT25F128B flash chip
 ## 1.1
 ## 1.1
  - New random filename API
  - New random filename API
 ## 1.0
 ## 1.0

+ 1 - 1
spi_mem_manager/application.fam

@@ -6,7 +6,7 @@ App(
     requires=["gui"],
     requires=["gui"],
     stack_size=1 * 2048,
     stack_size=1 * 2048,
     fap_description="Application for reading and writing 25-series SPI memory chips",
     fap_description="Application for reading and writing 25-series SPI memory chips",
-    fap_version="1.1",
+    fap_version="1.2",
     fap_icon="images/Dip8_10px.png",
     fap_icon="images/Dip8_10px.png",
     fap_category="GPIO",
     fap_category="GPIO",
     fap_icon_assets="images",
     fap_icon_assets="images",

+ 1 - 0
spi_mem_manager/lib/spi/spi_mem_chip.c

@@ -38,6 +38,7 @@ const SPIMemChipVendorName spi_mem_chip_vendor_names[] = {
     {"Fudan", SPIMemChipVendorFudan},
     {"Fudan", SPIMemChipVendorFudan},
     {"Genitop", SPIMemChipVendorGenitop},
     {"Genitop", SPIMemChipVendorGenitop},
     {"Paragon", SPIMemChipVendorParagon},
     {"Paragon", SPIMemChipVendorParagon},
+    {"XTX", SPIMemChipVendorXTX},
     {"Unknown", SPIMemChipVendorUnknown}};
     {"Unknown", SPIMemChipVendorUnknown}};
 
 
 static const char* spi_mem_chip_search_vendor_name(SPIMemChipVendor vendor_enum) {
 static const char* spi_mem_chip_search_vendor_name(SPIMemChipVendor vendor_enum) {

+ 2 - 1
spi_mem_manager/lib/spi/spi_mem_chip_arr.c

@@ -1396,4 +1396,5 @@ const SPIMemChip SPIMemChips[] = {
     {0xA1, 0x40, 0x13, "FM25Q04A", 524288, 256, SPIMemChipVendorFudan, SPIMemChipWriteModePage},
     {0xA1, 0x40, 0x13, "FM25Q04A", 524288, 256, SPIMemChipVendorFudan, SPIMemChipWriteModePage},
     {0xA1, 0x40, 0x16, "FM25Q32", 4194304, 256, SPIMemChipVendorFudan, SPIMemChipWriteModePage},
     {0xA1, 0x40, 0x16, "FM25Q32", 4194304, 256, SPIMemChipVendorFudan, SPIMemChipWriteModePage},
     {0xE0, 0x40, 0x14, "GT25Q80A", 1048576, 256, SPIMemChipVendorGenitop, SPIMemChipWriteModePage},
     {0xE0, 0x40, 0x14, "GT25Q80A", 1048576, 256, SPIMemChipVendorGenitop, SPIMemChipWriteModePage},
-    {0xE0, 0x40, 0x13, "PN25F04A", 524288, 256, SPIMemChipVendorParagon, SPIMemChipWriteModePage}};
+    {0xE0, 0x40, 0x13, "PN25F04A", 524288, 256, SPIMemChipVendorParagon, SPIMemChipWriteModePage},
+    {0x0B, 0x40, 0x18, "XT25F128B", 16777216, 256, SPIMemChipVendorXTX, SPIMemChipWriteModePage}};

+ 2 - 1
spi_mem_manager/lib/spi/spi_mem_chip_i.h

@@ -41,7 +41,8 @@ typedef enum {
     SPIMemChipVendorFremont,
     SPIMemChipVendorFremont,
     SPIMemChipVendorFudan,
     SPIMemChipVendorFudan,
     SPIMemChipVendorGenitop,
     SPIMemChipVendorGenitop,
-    SPIMemChipVendorParagon
+    SPIMemChipVendorParagon,
+    SPIMemChipVendorXTX
 } SPIMemChipVendor;
 } SPIMemChipVendor;
 
 
 typedef enum {
 typedef enum {