We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0366f9 commit c8c5481Copy full SHA for c8c5481
Cmd_Env.cpp
@@ -26,6 +26,7 @@ std::vector<std::string> env_list = {
26
"allow_write",
27
"app_name",
28
"app_version",
29
+ "serial",
30
31
"reboot_count",
32
"watchdog_failed_count",
@@ -41,6 +42,7 @@ enum {
41
42
43
EnvType_str, EnvType_bin,
44
};
45
+
46
std::unordered_map<std::string, std::tuple<uint8_t, uint8_t, uint8_t, uint8_t>> env_table = {
47
// Category, Type, Offset, Size
48
{"watchdog_config", {0, EnvType_u8, 1, 1}},
@@ -49,6 +51,7 @@ std::unordered_map<std::string, std::tuple<uint8_t, uint8_t, uint8_t, uint8_t>>
49
51
{"allow_write", {0, EnvType_u32, 8, 4}},
50
52
{"app_name", {0, EnvType_str, 12, 16}},
53
{"app_version", {0, EnvType_str, 28, 8}},
54
+ {"serial", {0, EnvType_str, 36, 16}},
55
56
{"reboot_count", {1, EnvType_u32, 0, 4}},
57
{"watchdog_failed_count", {1, EnvType_u32, 4, 4}},
Cmd_Info.cpp
@@ -66,5 +66,15 @@ int Command_Info(const std::vector<std::string>& args) {
66
printf("Chip name: %s\n", info_chip.data());
67
printf("Chip Manufacturer: %s\n", info_chip_mf.data());
68
69
+ uint8_t cat = 0;
70
+ auto env_block0 = serial_chat(tty, FlasherCommand_EnvironmentRead, &cat);
71
72
+ if (env_block0.size() >= 52) {
73
+ printf("Serial: ");
74
+ fflush(stdout);
75
+ write(STDOUT_FILENO, env_block0.data()+36, 16);
76
+ puts("");
77
+ }
78
79
return 0;
80
}
ScanDevice.cpp
@@ -60,7 +60,6 @@ std::vector<std::string> ScanDevice_GetValidDevices() {
60
61
try {
62
tty.make_raw();
63
- tty.speed() = 2000000;
64
} catch (...) {
65
#ifndef __CYGWIN__
continue;
0 commit comments