SDCard version

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

Committer:
thedo
Date:
Fri Jul 21 01:26:54 2017 +0000
Revision:
167:2ee3e82cb6f5
gr-peach-opencv-project-sd-card

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thedo 167:2ee3e82cb6f5 1
thedo 167:2ee3e82cb6f5 2 /** \addtogroup platform */
thedo 167:2ee3e82cb6f5 3 /** @{*/
thedo 167:2ee3e82cb6f5 4 /* mbed Microcontroller Library
thedo 167:2ee3e82cb6f5 5 * Copyright (c) 2006-2013 ARM Limited
thedo 167:2ee3e82cb6f5 6 *
thedo 167:2ee3e82cb6f5 7 * Licensed under the Apache License, Version 2.0 (the "License");
thedo 167:2ee3e82cb6f5 8 * you may not use this file except in compliance with the License.
thedo 167:2ee3e82cb6f5 9 * You may obtain a copy of the License at
thedo 167:2ee3e82cb6f5 10 *
thedo 167:2ee3e82cb6f5 11 * http://www.apache.org/licenses/LICENSE-2.0
thedo 167:2ee3e82cb6f5 12 *
thedo 167:2ee3e82cb6f5 13 * Unless required by applicable law or agreed to in writing, software
thedo 167:2ee3e82cb6f5 14 * distributed under the License is distributed on an "AS IS" BASIS,
thedo 167:2ee3e82cb6f5 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
thedo 167:2ee3e82cb6f5 16 * See the License for the specific language governing permissions and
thedo 167:2ee3e82cb6f5 17 * limitations under the License.
thedo 167:2ee3e82cb6f5 18 */
thedo 167:2ee3e82cb6f5 19 #ifndef MBED_ERROR_H
thedo 167:2ee3e82cb6f5 20 #define MBED_ERROR_H
thedo 167:2ee3e82cb6f5 21
thedo 167:2ee3e82cb6f5 22 /** To generate a fatal compile-time error, you can use the pre-processor #error directive.
thedo 167:2ee3e82cb6f5 23 *
thedo 167:2ee3e82cb6f5 24 * @code
thedo 167:2ee3e82cb6f5 25 * #error "That shouldn't have happened!"
thedo 167:2ee3e82cb6f5 26 * @endcode
thedo 167:2ee3e82cb6f5 27 *
thedo 167:2ee3e82cb6f5 28 * If the compiler evaluates this line, it will report the error and stop the compile.
thedo 167:2ee3e82cb6f5 29 *
thedo 167:2ee3e82cb6f5 30 * For example, you could use this to check some user-defined compile-time variables:
thedo 167:2ee3e82cb6f5 31 *
thedo 167:2ee3e82cb6f5 32 * @code
thedo 167:2ee3e82cb6f5 33 * #define NUM_PORTS 7
thedo 167:2ee3e82cb6f5 34 * #if (NUM_PORTS > 4)
thedo 167:2ee3e82cb6f5 35 * #error "NUM_PORTS must be less than 4"
thedo 167:2ee3e82cb6f5 36 * #endif
thedo 167:2ee3e82cb6f5 37 * @endcode
thedo 167:2ee3e82cb6f5 38 *
thedo 167:2ee3e82cb6f5 39 * Reporting Run-Time Errors:
thedo 167:2ee3e82cb6f5 40 * To generate a fatal run-time error, you can use the mbed error() function.
thedo 167:2ee3e82cb6f5 41 *
thedo 167:2ee3e82cb6f5 42 * @code
thedo 167:2ee3e82cb6f5 43 * error("That shouldn't have happened!");
thedo 167:2ee3e82cb6f5 44 * @endcode
thedo 167:2ee3e82cb6f5 45 *
thedo 167:2ee3e82cb6f5 46 * If the mbed running the program executes this function, it will print the
thedo 167:2ee3e82cb6f5 47 * message via the USB serial port, and then die with the blue lights of death!
thedo 167:2ee3e82cb6f5 48 *
thedo 167:2ee3e82cb6f5 49 * The message can use printf-style formatting, so you can report variables in the
thedo 167:2ee3e82cb6f5 50 * message too. For example, you could use this to check a run-time condition:
thedo 167:2ee3e82cb6f5 51 *
thedo 167:2ee3e82cb6f5 52 * @code
thedo 167:2ee3e82cb6f5 53 * if(x >= 5) {
thedo 167:2ee3e82cb6f5 54 * error("expected x to be less than 5, but got %d", x);
thedo 167:2ee3e82cb6f5 55 * }
thedo 167:2ee3e82cb6f5 56 * @endcode
thedo 167:2ee3e82cb6f5 57 */
thedo 167:2ee3e82cb6f5 58
thedo 167:2ee3e82cb6f5 59 #ifdef __cplusplus
thedo 167:2ee3e82cb6f5 60 extern "C" {
thedo 167:2ee3e82cb6f5 61 #endif
thedo 167:2ee3e82cb6f5 62
thedo 167:2ee3e82cb6f5 63 void error(const char* format, ...);
thedo 167:2ee3e82cb6f5 64
thedo 167:2ee3e82cb6f5 65 #ifdef __cplusplus
thedo 167:2ee3e82cb6f5 66 }
thedo 167:2ee3e82cb6f5 67 #endif
thedo 167:2ee3e82cb6f5 68
thedo 167:2ee3e82cb6f5 69 #endif
thedo 167:2ee3e82cb6f5 70
thedo 167:2ee3e82cb6f5 71 /** @}*/
thedo 167:2ee3e82cb6f5 72