import tkinter as tk

root = tk.Tk() root.title('Debug Module ID')

create entry widget

entry = tk.Entry(root, width=50) entry.pack(pady=10)

create button widget

def show_debug(): hex_string = entry.get() hex_value = int(hex_string, 16) output = 'The corresponding debug modules are: ' for i in range(34): if hex_value & (1 << i): if i == 0: output += 'CAM_CDM ' elif i == 1: output += 'CAM_CORE ' elif i == 2: output += 'CAM_CPAS ' elif i == 3: output += 'CAM_ISP ' elif i == 4: output += 'CAM_CRM ' elif i == 5: output += 'CAM_SENSOR ' elif i == 6: output += 'CAM_SMMU ' elif i == 7: output += 'CAM_SYNC ' elif i == 8: output += 'CAM_ICP ' elif i == 9: output += 'CAM_JPEG ' elif i == 10: output += 'CAM_FD ' elif i == 11: output += 'CAM_LRME ' elif i == 12: output += 'CAM_FLASH ' elif i == 13: output += 'CAM_ACTUATOR ' elif i == 14: output += 'CAM_CCI ' elif i == 15: output += 'CAM_CSIPHY ' elif i == 16: output += 'CAM_EEPROM ' elif i == 17: output += 'CAM_UTIL ' elif i == 18: output += 'CAM_HFI ' elif i == 19: output += 'CAM_CTXT ' elif i == 20: output += 'CAM_OIS ' elif i == 21: output += 'CAM_RES ' elif i == 22: output += 'CAM_MEM ' elif i == 23: output += 'CAM_IRQ_CTRL ' elif i == 24: output += 'CAM_REQ ' elif i == 25: output += 'CAM_PERF ' elif i == 26: output += 'CAM_CUSTOM ' elif i == 27: output += 'CAM_PRESIL ' elif i == 28: output += 'CAM_OPE ' elif i == 29: output += 'CAM_IO_ACCESS ' elif i == 30: output += 'CAM_SFE ' elif i == 31: output += 'CAM_CRE ' elif i == 32: output += 'CAM_PRESIL_CORE ' elif i == 33: output += 'CAM_TPG ' output_box.delete('1.0', tk.END) output_box.insert(tk.END, output)

button = tk.Button(root, text='Show Debug Modules', command=show_debug) button.pack()

create text widget

output_box = tk.Text(root, height=10, width=50) output_box.pack(pady=10)

root.mainloop()

Python GUI App for Identifying Debug Modules from Hex String

原文地址: https://www.cveoy.top/t/topic/lEYv 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录