Rtos API example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers unity_config.h Source File

unity_config.h

00001 
00002 /** \addtogroup frameworks */
00003 /** @{*/
00004 /****************************************************************************
00005  * Copyright (c) 2015, ARM Limited, All Rights Reserved
00006  * SPDX-License-Identifier: Apache-2.0
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License"); you may
00009  * not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  * http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00016  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  ****************************************************************************
00020  */
00021 
00022 #ifndef UNITY_CONFIG_H
00023 #define UNITY_CONFIG_H
00024 
00025 /* When using unity with the mbed RTOS printing to the serial port using the stdlib is not 
00026    allowed as it causes a hardfault. Unity has the following define to control how failure
00027    messages are written:
00028    
00029    #ifndef UNITY_OUTPUT_CHAR
00030        #include <stdio.h>
00031        #define UNITY_OUTPUT_CHAR(a) (void)putchar(a)
00032    #endif
00033    
00034    To make this safe we can define our own version of UNITY_OUTPUT_CHAR and make sure it is 
00035    thread safe.
00036 */
00037 #ifndef UNITY_OUTPUT_CHAR
00038 #define UNITY_OUTPUT_CHAR(a) utest_safe_putc(a)
00039 #endif //UNITY_OUTPUT_CHAR
00040     
00041 #endif // UNITY_CONFIG_H
00042 
00043 /** @}*/