|
| 1 | +/* |
| 2 | + * Copyright (c) 2014-2015 ARM Limited. All rights reserved. |
| 3 | + * SPDX-License-Identifier: Apache-2.0 |
| 4 | + * Licensed under the Apache License, Version 2.0 (the License); you may |
| 5 | + * not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
| 12 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | +#include <stdio.h> |
| 17 | +#include <string.h> |
| 18 | +#include <stdarg.h> |
| 19 | +#include <stdlib.h> |
| 20 | + |
| 21 | +#ifndef YOTTA_CFG_MBED_TRACE |
| 22 | +#define YOTTA_CFG_MBED_TRACE |
| 23 | +#define YOTTA_CFG_MBED_TRACE_FEA_IPV6 1 |
| 24 | +#endif |
| 25 | + |
| 26 | +#include "mbed-trace/mbed_trace.h" |
| 27 | +#if YOTTA_CFG_MBED_TRACE_FEA_IPV6 == 1 |
| 28 | +#include "mbed-client-libservice/ip6string.h" |
| 29 | +#include "mbed-client-libservice/common_functions.h" |
| 30 | +#endif |
| 31 | + |
| 32 | + |
| 33 | +int mbed_trace_init(void) |
| 34 | +{ |
| 35 | + return 0; |
| 36 | +} |
| 37 | +void mbed_trace_free(void) |
| 38 | +{ |
| 39 | +} |
| 40 | + |
| 41 | +void mbed_trace_buffer_sizes(int lineLength, int tmpLength) |
| 42 | +{ |
| 43 | +} |
| 44 | + |
| 45 | +void mbed_trace_config_set(uint8_t config) |
| 46 | +{ |
| 47 | +} |
| 48 | + |
| 49 | +uint8_t mbed_trace_config_get(void) |
| 50 | +{ |
| 51 | + return 0; |
| 52 | +} |
| 53 | + |
| 54 | +void mbed_trace_prefix_function_set(char *(*pref_f)(size_t)) |
| 55 | +{ |
| 56 | +} |
| 57 | + |
| 58 | +void mbed_trace_suffix_function_set(char *(*suffix_f)(void)) |
| 59 | +{ |
| 60 | +} |
| 61 | + |
| 62 | +void mbed_trace_print_function_set(void (*printf)(const char *)) |
| 63 | +{ |
| 64 | +} |
| 65 | + |
| 66 | +void mbed_trace_cmdprint_function_set(void (*printf)(const char *)) |
| 67 | +{ |
| 68 | +} |
| 69 | + |
| 70 | +void mbed_trace_exclude_filters_set(char *filters) |
| 71 | +{ |
| 72 | + |
| 73 | +} |
| 74 | + |
| 75 | +const char *mbed_trace_exclude_filters_get(void) |
| 76 | +{ |
| 77 | + return NULL; |
| 78 | +} |
| 79 | + |
| 80 | +const char *mbed_trace_include_filters_get(void) |
| 81 | +{ |
| 82 | + return NULL; |
| 83 | +} |
| 84 | + |
| 85 | +void mbed_trace_include_filters_set(char *filters) |
| 86 | +{ |
| 87 | + |
| 88 | +} |
| 89 | + |
| 90 | +void mbed_tracef(uint8_t dlevel, const char *grp, const char *fmt, ...) |
| 91 | +{ |
| 92 | +} |
| 93 | + |
| 94 | +const char *mbed_trace_last(void) |
| 95 | +{ |
| 96 | + return NULL; |
| 97 | +} |
| 98 | + |
| 99 | +/* Helping functions */ |
| 100 | +#define tmp_data_left() m_trace.tmp_data_length-(m_trace.tmp_data_ptr-m_trace.tmp_data) |
| 101 | +#if YOTTA_CFG_MBED_TRACE_FEA_IPV6 == 1 |
| 102 | +char *mbed_trace_ipv6(const void *addr_ptr) |
| 103 | +{ |
| 104 | + return NULL; |
| 105 | +} |
| 106 | + |
| 107 | +char *mbed_trace_ipv6_prefix(const uint8_t *prefix, uint8_t prefix_len) |
| 108 | +{ |
| 109 | + return NULL; |
| 110 | +} |
| 111 | +#endif //YOTTA_CFG_MBED_TRACE_FEA_IPV6 |
| 112 | + |
| 113 | +char *mbed_trace_array(const uint8_t *buf, uint16_t len) |
| 114 | +{ |
| 115 | + return NULL; |
| 116 | +} |
0 commit comments