Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBHost by
dbg.h
00001 /* mbed USBHost Library 00002 * Copyright (c) 2006-2013 ARM Limited 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef USB_DEBUG_H 00018 #define USB_DEBUG_H 00019 00020 //Debug is disabled by default 00021 #define DEBUG 3 /*INFO,ERR,WARN*/ 00022 //#define DEBUG 0 00023 #define DEBUG_TRANSFER 0 00024 #define DEBUG_EP_STATE 0 00025 #define DEBUG_EVENT 0 00026 00027 #if (DEBUG > 3) 00028 #define USB_DBG(x, ...) std::printf("[USB_DBG: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00029 #else 00030 #define USB_DBG(x, ...) 00031 #endif 00032 00033 #if (DEBUG > 2) 00034 #define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00035 #else 00036 #define USB_INFO(x, ...) 00037 #endif 00038 00039 #if (DEBUG > 1) 00040 #define USB_WARN(x, ...) std::printf("[USB_WARNING: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00041 #else 00042 #define USB_WARN(x, ...) 00043 #endif 00044 00045 #if (DEBUG > 0) 00046 #define USB_ERR(x, ...) std::printf("[USB_ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00047 #else 00048 #define USB_ERR(x, ...) 00049 #endif 00050 00051 #if (DEBUG_TRANSFER) 00052 #define USB_DBG_TRANSFER(x, ...) std::printf("[USB_TRANSFER: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00053 #else 00054 #define USB_DBG_TRANSFER(x, ...) 00055 #endif 00056 00057 #if (DEBUG_EVENT) 00058 #define USB_DBG_EVENT(x, ...) std::printf("[USB_EVENT: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00059 #else 00060 #define USB_DBG_EVENT(x, ...) 00061 #endif 00062 00063 00064 #endif 00065 00066 00067
Generated on Wed Jul 13 2022 05:47:50 by
1.7.2
