Mbed OS Reference
Loading...
Searching...
No Matches
ac_debug.h
Go to the documentation of this file.
1/**
2 * \file ac_debug.h
3 * \copyright Copyright (c) ARM Ltd 2018
4 * \author Donatien Garnier
5 */
6/*
7 * Copyright (c) 2018, ARM Limited, All Rights Reserved
8 * SPDX-License-Identifier: Apache-2.0
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); you may
11 * not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22
23#ifndef ACORE_DEBUG_H_
24#define ACORE_DEBUG_H_
25
26// Macro that can be defined to lock stdio in multithreaded environments
27#if !defined(ACORE_STDIO_LOCK)
28#define ACORE_STDIO_LOCK()
29#endif
30
31#if !defined(ACORE_STDIO_UNLOCK)
32#define ACORE_STDIO_UNLOCK()
33#endif
34
35// Macro that can be defined to define an alternative printf impl for debugging
36#if !defined(ACORE_STDIO_PRINT)
37#include "stdio.h"
38#define ACORE_STDIO_PRINT(...) printf(__VA_ARGS__)
39#endif
40
41#endif