bool system_module_info(appender_fn append, void* append_data, void* reserved) { hal_system_info_t info; memset(&info, 0, sizeof(info)); info.size = sizeof(info); HAL_System_Info(&info, true, NULL); bool result = system_info_to_json(append, append_data, info); HAL_System_Info(&info, false, NULL); return result; }
uint32_t compute_describe_system_checksum() { hal_system_info_t info; memset(&info, 0, sizeof(info)); info.size = sizeof(info); HAL_System_Info(&info, true, NULL); uint32_t checksum = info.platform_id; for (int i=0; i<info.module_count; i++) { checksum += crc(info.modules[i].suffix->sha); } HAL_System_Info(&info, false, NULL); return checksum; }