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: LOG oam reg query MODULE 15 */ 16 17 #ifndef LOG_OAM_MEM_QUERY_H 18 #define LOG_OAM_MEM_QUERY_H 19 #include "product.h" 20 #if SYS_DEBUG_MODE_ENABLE == YES 21 22 #ifndef _LIB_LOG_READER_LOG_OAM_MEM_QUERY_H 23 #define _LIB_LOG_READER_LOG_OAM_MEM_QUERY_H 24 25 #include "log_oam_logger.h" 26 #ifdef SUPPORT_IPC 27 #include "ipc_actions.h" 28 #endif 29 30 #if USE_COMPRESS_LOG_INSTEAD_OF_SDT_LOG == NO 31 typedef struct { 32 om_msg_header_stru_t header; 33 uint32_t mem_start_addr; 34 uint16_t data_len; 35 uint8_t mode; 36 uint8_t reserve; 37 } __attribute__((packed)) om_mem_req_header_t; 38 #endif 39 40 enum MEM_QUERY_ACTION { 41 MEM_ACTION_WRITE, 42 MEM_ACTION_READ, 43 MEM_ACTION_WRITE_BLOCK, 44 MEM_ACTION_READ_BLOCK, 45 }; 46 47 void oml_mem_command(uint8_t *data, uint16_t length); 48 49 void oml_btc_command(uint8_t *data, uint16_t length); 50 51 void oml_mem_register_callback(void); 52 53 void oml_btc_cmd_callback(void); 54 55 #endif /* end of log_oam_mem_query.h */ 56 57 #endif /* end of SYS_DEBUG_MODE_ENABLE == YES */ 58 #endif