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 ae4b95e commit b91cd83Copy full SHA for b91cd83
qt/chip_db.cpp
@@ -29,3 +29,18 @@ ChipInfo *getChipInfoByName(char *name)
29
30
return 0;
31
}
32
+
33
+ChipInfo *getChipInfoById(uint32_t id)
34
+{
35
+ if (id == CHIP_ID_NONE || id >= CHIP_ID_LAST)
36
+ return NULL;
37
38
+ return &chipDB[id];
39
+}
40
41
+uint32_t getChipPageSize(uint32_t id)
42
43
+ ChipInfo *info = getChipInfoById(id);
44
45
+ return info ? info->page_size : 0;
46
qt/chip_db.h
@@ -28,6 +28,8 @@ typedef struct
28
uint32_t getChipDB(ChipInfo *&db);
ChipInfo *getChipInfoByName(char *name);
+ChipInfo *getChipInfoById(uint32_t id);
+uint32_t getChipPageSize(uint32_t id);
#endif // CHIP_DB_H
0 commit comments