2018.07.26

Dependencies:   FATFileSystem2 mbed-rtos

Fork of USBHost by mbed official

Committer:
sayzyas
Date:
Thu Jul 26 00:29:30 2018 +0000
Revision:
44:e437b1c7c61e
Parent:
43:78f328f311dc
2018.07.26

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sayzyas 43:78f328f311dc 1 /* mbed USBHost Library
sayzyas 43:78f328f311dc 2 * Copyright (c) 2006-2013 ARM Limited
sayzyas 43:78f328f311dc 3 *
sayzyas 43:78f328f311dc 4 * Licensed under the Apache License, Version 2.0 (the "License");
sayzyas 43:78f328f311dc 5 * you may not use this file except in compliance with the License.
sayzyas 43:78f328f311dc 6 * You may obtain a copy of the License at
sayzyas 43:78f328f311dc 7 *
sayzyas 43:78f328f311dc 8 * http://www.apache.org/licenses/LICENSE-2.0
sayzyas 43:78f328f311dc 9 *
sayzyas 43:78f328f311dc 10 * Unless required by applicable law or agreed to in writing, software
sayzyas 43:78f328f311dc 11 * distributed under the License is distributed on an "AS IS" BASIS,
sayzyas 43:78f328f311dc 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
sayzyas 43:78f328f311dc 13 * See the License for the specific language governing permissions and
sayzyas 43:78f328f311dc 14 * limitations under the License.
sayzyas 43:78f328f311dc 15 */
sayzyas 43:78f328f311dc 16
sayzyas 43:78f328f311dc 17 #ifndef USB_DEBUG_H
sayzyas 43:78f328f311dc 18 #define USB_DEBUG_H
sayzyas 43:78f328f311dc 19
sayzyas 43:78f328f311dc 20 //Debug is disabled by default
sayzyas 43:78f328f311dc 21 #define DEBUG 3 /*INFO,ERR,WARN*/
sayzyas 43:78f328f311dc 22 #define DEBUG_TRANSFER 0
sayzyas 43:78f328f311dc 23 #define DEBUG_EP_STATE 0
sayzyas 43:78f328f311dc 24 #define DEBUG_EVENT 0
sayzyas 43:78f328f311dc 25
sayzyas 43:78f328f311dc 26 #if (DEBUG > 3)
sayzyas 43:78f328f311dc 27 #define USB_DBG(x, ...) std::printf("[USB_DBG: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
sayzyas 43:78f328f311dc 28 #else
sayzyas 43:78f328f311dc 29 #define USB_DBG(x, ...)
sayzyas 43:78f328f311dc 30 #endif
sayzyas 43:78f328f311dc 31
sayzyas 43:78f328f311dc 32 #if (DEBUG > 2)
sayzyas 43:78f328f311dc 33 #define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
sayzyas 43:78f328f311dc 34 #else
sayzyas 43:78f328f311dc 35 #define USB_INFO(x, ...)
sayzyas 43:78f328f311dc 36 #endif
sayzyas 43:78f328f311dc 37
sayzyas 43:78f328f311dc 38 #if (DEBUG > 1)
sayzyas 43:78f328f311dc 39 #define USB_WARN(x, ...) std::printf("[USB_WARNING: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
sayzyas 43:78f328f311dc 40 #else
sayzyas 43:78f328f311dc 41 #define USB_WARN(x, ...)
sayzyas 43:78f328f311dc 42 #endif
sayzyas 43:78f328f311dc 43
sayzyas 43:78f328f311dc 44 #if (DEBUG > 0)
sayzyas 43:78f328f311dc 45 #define USB_ERR(x, ...) std::printf("[USB_ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
sayzyas 43:78f328f311dc 46 #else
sayzyas 43:78f328f311dc 47 #define USB_ERR(x, ...)
sayzyas 43:78f328f311dc 48 #endif
sayzyas 43:78f328f311dc 49
sayzyas 43:78f328f311dc 50 #if (DEBUG_TRANSFER)
sayzyas 43:78f328f311dc 51 #define USB_DBG_TRANSFER(x, ...) std::printf("[USB_TRANSFER: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
sayzyas 43:78f328f311dc 52 #else
sayzyas 43:78f328f311dc 53 #define USB_DBG_TRANSFER(x, ...)
sayzyas 43:78f328f311dc 54 #endif
sayzyas 43:78f328f311dc 55
sayzyas 43:78f328f311dc 56 #if (DEBUG_EVENT)
sayzyas 43:78f328f311dc 57 #define USB_DBG_EVENT(x, ...) std::printf("[USB_EVENT: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
sayzyas 43:78f328f311dc 58 #else
sayzyas 43:78f328f311dc 59 #define USB_DBG_EVENT(x, ...)
sayzyas 43:78f328f311dc 60 #endif
sayzyas 43:78f328f311dc 61
sayzyas 43:78f328f311dc 62
sayzyas 43:78f328f311dc 63 #endif
sayzyas 43:78f328f311dc 64
sayzyas 43:78f328f311dc 65
sayzyas 43:78f328f311dc 66