1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 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 * Description: the header file for main. 15 * 16 */ 17 18 #ifndef __MAIN_H__ 19 #define __MAIN_H__ 20 21 #ifdef __cplusplus 22 #if __cplusplus 23 extern "C" { 24 #endif 25 #endif 26 27 __attribute__((section(".text.runtime.init"))) void copy_bin_to_ram(unsigned int *start_addr, 28 const unsigned int *const load_addr, unsigned int size); 29 __attribute__((section(".text.runtime.init"))) void init_mem_value(unsigned int *start_addr, 30 const unsigned int *const end_addr, unsigned int init_val); 31 __attribute__((section(".text.runtime.init"))) void do_relocation(void); 32 __attribute__((section(".text.runtime.init"))) void runtime_init(void); 33 34 extern void LOS_PrepareMainTask(void); 35 36 #ifdef WIFI_TASK_EXIST 37 extern int wifi_host_task(void *param); 38 extern __attribute__((weak)) int demo_init(void *param); 39 #endif 40 41 #ifdef CONFIG_SUPPORT_HILINK 42 extern __attribute__((weak)) int hilink_entry(void *param); 43 #endif 44 #ifdef BGLE_TASK_EXIST 45 extern void bt_thread_handle(void *para); 46 #ifdef SPARKLYZER_ACTIVATED 47 extern void splz_thread_handle(void *para); 48 #endif 49 #endif 50 51 #ifdef AT_COMMAND 52 void at_uart_init(void); 53 #endif 54 55 #ifdef __cplusplus 56 #if __cplusplus 57 } 58 #endif 59 #endif 60 61 #endif // __MAIN_H__ 62