Opencv 3.1 project on GR-PEACH board

Fork of gr-peach-opencv-project by the do

Committer:
thedo
Date:
Thu Jun 29 11:01:39 2017 +0000
Revision:
167:1657b442184c
Opencv 3.1 project on GR-PEACH board, 4 apps

Who changed what in which revision?

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