1 // Copyright (C) 2022 Beken Corporation 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #pragma once 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 #include <common/sys_config.h> 22 23 24 #define CPU_BOOT_TIME_ADDR (0x20007FF0) 25 26 typedef enum { 27 CPU_BOOT_TIME = 0x0, 28 CPU_INIT_MEM_TIME = 0x1, 29 CPU_MAIN_ENTRY_TIME = 0x2, 30 CPU_INIT_DRIVER_TIME = 0x3, 31 CPU_APP_ENTRY_TIME = 0x4, 32 CPU_START_SCHE_TIME = 0x5, 33 CPU_START_WIFI_INIT_TIME = 0x6, 34 CPU_FINISH_WIFI_INIT_TIME = 0x7, 35 CPU_APP_FINISH_TIME = 0x8, 36 CPU_MIAN_FINISH_TIME = 0x9, 37 CPU_START_CONNECT_TIME = 0xa, 38 CPU_CONNECTED_TIME = 0xb, 39 CPU_SAVED_TIME_MAX = 0xc 40 } CPU_BOOT_TIME_POINT; 41 42 void save_mtime_point(uint32_t time_point); 43 void show_saved_mtime_info(void); 44 void show_current_time_point(const char *info); 45 46 47 #ifdef __cplusplus 48 } 49 #endif 50