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.
Dependencies: FATFileSystem mbed-rtos
Dependents: USBHostC210_example USBHostC270_example GSwifi_ap_webcam n-bed-USBHostC270_example
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 0 00022 #define DEBUG_TRANSFER 0 00023 #define DEBUG_EP_STATE 0 00024 #define DEBUG_EVENT 0 00025 00026 #if (DEBUG) 00027 //#define USB_DBG(x, ...) std::printf("[USB_DBG: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00028 #define USB_DBG(x, ...) std::printf("[USB_DBG: %s:%d]"x"\r\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 00029 #else 00030 #define USB_DBG(x, ...) 00031 #endif 00032 00033 #if (DEBUG_TRANSFER) 00034 #define USB_DBG_TRANSFER(x, ...) std::printf("[USB_TRANSFER: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00035 #else 00036 #define USB_DBG_TRANSFER(x, ...) 00037 #endif 00038 00039 #if (DEBUG_EVENT) 00040 #define USB_DBG_EVENT(x, ...) std::printf("[USB_EVENT: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00041 #else 00042 #define USB_DBG_EVENT(x, ...) 00043 #endif 00044 00045 #define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00046 #define USB_WARN(x, ...) std::printf("[USB_WARNING: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00047 #define USB_ERR(x, ...) std::printf("[USB_ERR: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00048 00049 #endif 00050 00051 00052
Generated on Thu Jul 14 2022 03:19:09 by
1.7.2
