Simple interface for Mbed Cloud Client
Embed:
(wiki syntax)
Show/hide line numbers
mbed-trace-helper.h
00001 // ---------------------------------------------------------------------------- 00002 // Copyright 2016-2017 ARM Ltd. 00003 // 00004 // Licensed under the Apache License, Version 2.0 (the "License"); 00005 // you may not use this file except in compliance with the License. 00006 // You may obtain a copy of the License at 00007 // 00008 // http://www.apache.org/licenses/LICENSE-2.0 00009 // 00010 // Unless required by applicable law or agreed to in writing, software 00011 // distributed under the License is distributed on an "AS IS" BASIS, 00012 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 // See the License for the specific language governing permissions and 00014 // limitations under the License. 00015 // ---------------------------------------------------------------------------- 00016 /* Logging macros */ 00017 00018 #ifndef __MBED_TRACE_HELPER_H__ 00019 #define __MBED_TRACE_HELPER_H__ 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 #include <stdio.h> 00026 #include <inttypes.h> 00027 #include <string.h> 00028 #include <stdbool.h> 00029 /** 00030 * Function used in mbed-trace to set trace print 00031 */ 00032 void mbed_trace_helper_print(const char* format); 00033 /** 00034 * Function used in mbed-trace to set wait mutex function 00035 */ 00036 void mbed_trace_helper_mutex_wait( void ); 00037 /** 00038 * Function used in mbed-trace to set release mutex function 00039 */ 00040 void mbed_trace_helper_mutex_release( void ); 00041 /** 00042 * This function creates mutex 00043 */ 00044 bool mbed_trace_helper_create_mutex( void ); 00045 /** 00046 * Deletes mutex 00047 */ 00048 void mbed_trace_helper_delete_mutex(void); 00049 /** 00050 * Check activated trace level according to MBED_TRACE_MAX_LEVEL and used level in mbed_trace_config_set. 00051 * In case the activated level is higher then MBED_TRACE_MAX_LEVEL, the function prints warning. 00052 */ 00053 uint8_t mbed_trace_helper_check_activated_trace_level( void ); 00054 /** 00055 * The function calls to configuration functions of mbed_trace_helper according to passed parameters and initializes mbed-trace 00056 */ 00057 bool mbed_trace_helper_init(uint8_t config, bool is_mutex_used); 00058 /** 00059 * The function terminats thred and mbed-trace 00060 */ 00061 void mbed_trace_helper_finish( void ); 00062 #ifdef __cplusplus 00063 } 00064 #endif 00065 #endif /*__TRACE_HELPER_H__*/ 00066
Generated on Tue Jul 12 2022 19:01:35 by 1.7.2