Explorar o código

chore: move device configuration into "define" macro

Sanghee Park hai 1 ano
pai
achega
9abb109aab
Modificáronse 2 ficheiros con 6 adicións e 2 borrados
  1. 2 2
      src/scenes/mtp/mtp.c
  2. 4 0
      src/scenes/mtp/mtp.h

+ 2 - 2
src/scenes/mtp/mtp.c

@@ -1086,11 +1086,11 @@ int BuildDeviceInfo(uint8_t* buffer) {
     ptr += length;
 
     // Device version
-    WriteMTPString(ptr, "1.0", &length);
+    WriteMTPString(ptr, MTP_DEVICE_VERSION, &length);
     ptr += length;
 
     // Serial number
-    WriteMTPString(ptr, "HakureiReimu", &length);
+    WriteMTPString(ptr, MTP_DEVICE_SERIAL, &length);
     ptr += length;
 
     return ptr - buffer;

+ 4 - 0
src/scenes/mtp/mtp.h

@@ -1,5 +1,9 @@
 #pragma once
 
+// MTP Device Serial
+#define MTP_DEVICE_SERIAL "HakureiReimu"
+#define MTP_DEVICE_VERISON "1.0"
+
 #define MTP_STANDARD_VERSION 100
 #define MTP_VENDOR_EXTENSION_ID 0x6
 #define MTP_VENDOR_EXTENSION_VERSION 100