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: Header file for hal_chip_rom.c. 15 */ 16 17 #ifndef HAL_CHIP_ROM_H 18 #define HAL_CHIP_ROM_H 19 20 /***************************************************************************** 21 1 其他头文件包含 22 *****************************************************************************/ 23 #include "osal_types.h" 24 #include "hal_device_rom.h" 25 #include "hal_ext_if_rom.h" 26 27 #ifdef __cplusplus 28 #if __cplusplus 29 extern "C" { 30 #endif 31 #endif 32 33 /***************************************************************************** 34 STRUCT定义 35 *****************************************************************************/ 36 37 38 /* 定义CHIP下专用寄存器 */ 39 typedef struct tag_hal_hal_chip_stru { 40 hal_to_dmac_chip_stru hal_chip_base; 41 hal_device_stru device; 42 hal_cfg_rf_custom_cap_info_stru rf_custom_mgr; 43 uintptr_t *_rom; /* ROM化后资源扩展指针 */ 44 } hal_chip_stru; 45 46 /***************************************************************************** 47 函数声明 48 *****************************************************************************/ 49 osal_void hal_mac_soft_reset(osal_void); 50 hal_chip_stru *hal_get_chip_stru(osal_void); 51 hal_to_dmac_device_stru *hal_chip_get_hal_device(osal_void); 52 hal_device_stru *hh503_chip_get_device(osal_void); 53 54 typedef osal_u32 (*hal_device_init_resv_cb)(hal_to_dmac_device_stru *hal_device_base); 55 // 原host 56 osal_u32 hal_chip_init(osal_void); 57 osal_void hal_chip_init_rf_custom_cap(hal_chip_stru *hal_chip); 58 59 typedef osal_u32 (*hal_device_init_resv_cb)(hal_to_dmac_device_stru *hal_device_base); 60 typedef osal_void (*hal_device_init_ext_cb)(hal_chip_stru *hal_chip); 61 osal_u32 hal_device_init_resv(hal_to_dmac_device_stru *hal_device_base); 62 osal_void hal_device_init_ext(hal_chip_stru *hal_chip); 63 64 #ifdef __cplusplus 65 #if __cplusplus 66 } 67 #endif 68 #endif 69 70 #endif /* end of hal_chip_rom.h */ 71