change some io settings for TWR-K22F-120M

Dependents:   twr_helloworld

Committer:
Jasper_lee
Date:
Tue Dec 23 03:35:08 2014 +0000
Revision:
0:b16d94660a33
change some io setting used in TWR-K22F120M

Who changed what in which revision?

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