Pinned to some recent date

Committer:
Simon Cooksey
Date:
Thu Nov 17 16:43:53 2016 +0000
Revision:
0:fb7af294d5d9
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Simon Cooksey 0:fb7af294d5d9 1 /* mbed Microcontroller Library
Simon Cooksey 0:fb7af294d5d9 2 * Copyright (c) 2006-2013 ARM Limited
Simon Cooksey 0:fb7af294d5d9 3 *
Simon Cooksey 0:fb7af294d5d9 4 * Licensed under the Apache License, Version 2.0 (the "License");
Simon Cooksey 0:fb7af294d5d9 5 * you may not use this file except in compliance with the License.
Simon Cooksey 0:fb7af294d5d9 6 * You may obtain a copy of the License at
Simon Cooksey 0:fb7af294d5d9 7 *
Simon Cooksey 0:fb7af294d5d9 8 * http://www.apache.org/licenses/LICENSE-2.0
Simon Cooksey 0:fb7af294d5d9 9 *
Simon Cooksey 0:fb7af294d5d9 10 * Unless required by applicable law or agreed to in writing, software
Simon Cooksey 0:fb7af294d5d9 11 * distributed under the License is distributed on an "AS IS" BASIS,
Simon Cooksey 0:fb7af294d5d9 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Simon Cooksey 0:fb7af294d5d9 13 * See the License for the specific language governing permissions and
Simon Cooksey 0:fb7af294d5d9 14 * limitations under the License.
Simon Cooksey 0:fb7af294d5d9 15 */
Simon Cooksey 0:fb7af294d5d9 16 #include <stdlib.h>
Simon Cooksey 0:fb7af294d5d9 17 #include <stdarg.h>
Simon Cooksey 0:fb7af294d5d9 18 #include "device.h"
Simon Cooksey 0:fb7af294d5d9 19 #include "platform/toolchain.h"
Simon Cooksey 0:fb7af294d5d9 20 #include "platform/mbed_error.h"
Simon Cooksey 0:fb7af294d5d9 21 #include "platform/mbed_interface.h"
Simon Cooksey 0:fb7af294d5d9 22 #if DEVICE_STDIO_MESSAGES
Simon Cooksey 0:fb7af294d5d9 23 #include <stdio.h>
Simon Cooksey 0:fb7af294d5d9 24 #endif
Simon Cooksey 0:fb7af294d5d9 25
Simon Cooksey 0:fb7af294d5d9 26 WEAK void error(const char* format, ...) {
Simon Cooksey 0:fb7af294d5d9 27 #ifndef NDEBUG
Simon Cooksey 0:fb7af294d5d9 28 va_list arg;
Simon Cooksey 0:fb7af294d5d9 29 va_start(arg, format);
Simon Cooksey 0:fb7af294d5d9 30 mbed_error_vfprintf(format, arg);
Simon Cooksey 0:fb7af294d5d9 31 va_end(arg);
Simon Cooksey 0:fb7af294d5d9 32 #endif
Simon Cooksey 0:fb7af294d5d9 33 exit(1);
Simon Cooksey 0:fb7af294d5d9 34 }