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 TRIGGER MODULE INTERRFACE 15 * Author: 16 * Create: 17 */ 18 19 #ifndef SRC_LIB_LOG_PRIVATE_LOG_TRIGGER_H 20 #define SRC_LIB_LOG_PRIVATE_LOG_TRIGGER_H 21 22 /** 23 * @addtogroup connectivity_libs_log 24 * @{ 25 */ 26 #include "core.h" 27 #define CORE_LOGGING APPS 28 typedef void (*log_trigger_callback_t)(void); 29 30 /** 31 * @brief Ensure the log reader will be triggered. 32 * This function should be called when the logger has detected it has written to an empty buffer. 33 */ 34 void log_trigger(void); 35 36 /** 37 * @brief Ensure the log trigger should be registered. 38 * This function should be called when the log module init. 39 * @param callback: should match the type<log_trigger_callback_t>. 40 */ 41 void register_log_trigger(log_trigger_callback_t callback); 42 43 /** 44 * @brief trigger ipc to inform A core to save data from share mem in flash 45 */ 46 #if (BTH_WITH_SMART_WEAR == NO) 47 #if (CORE == BT) 48 void massdata_trigger(void *pay_i, uint8_t core, uint8_t type); 49 #endif 50 #endif 51 52 /** 53 * @} 54 */ 55 #endif 56