Opencv 3.1 project on GR-PEACH board
Fork of gr-peach-opencv-project by
USBHost_custom/USBHost/dbg.h@170:54ff26da7eb6, 2017-07-04 (annotated)
- Committer:
- thedo
- Date:
- Tue Jul 04 06:23:13 2017 +0000
- Revision:
- 170:54ff26da7eb6
- Parent:
- 166:3a9487d57a5c
project opencv 3.1 on GR PEACH board, no use SD card.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thedo | 166:3a9487d57a5c | 1 | /* mbed USBHost Library |
thedo | 166:3a9487d57a5c | 2 | * Copyright (c) 2006-2013 ARM Limited |
thedo | 166:3a9487d57a5c | 3 | * |
thedo | 166:3a9487d57a5c | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
thedo | 166:3a9487d57a5c | 5 | * you may not use this file except in compliance with the License. |
thedo | 166:3a9487d57a5c | 6 | * You may obtain a copy of the License at |
thedo | 166:3a9487d57a5c | 7 | * |
thedo | 166:3a9487d57a5c | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
thedo | 166:3a9487d57a5c | 9 | * |
thedo | 166:3a9487d57a5c | 10 | * Unless required by applicable law or agreed to in writing, software |
thedo | 166:3a9487d57a5c | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
thedo | 166:3a9487d57a5c | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
thedo | 166:3a9487d57a5c | 13 | * See the License for the specific language governing permissions and |
thedo | 166:3a9487d57a5c | 14 | * limitations under the License. |
thedo | 166:3a9487d57a5c | 15 | */ |
thedo | 166:3a9487d57a5c | 16 | |
thedo | 166:3a9487d57a5c | 17 | #ifndef USB_DEBUG_H |
thedo | 166:3a9487d57a5c | 18 | #define USB_DEBUG_H |
thedo | 166:3a9487d57a5c | 19 | |
thedo | 166:3a9487d57a5c | 20 | //Debug is disabled by default |
thedo | 166:3a9487d57a5c | 21 | #define DEBUG 3 /*INFO,ERR,WARN*/ |
thedo | 166:3a9487d57a5c | 22 | #define DEBUG_TRANSFER 0 |
thedo | 166:3a9487d57a5c | 23 | #define DEBUG_EP_STATE 0 |
thedo | 166:3a9487d57a5c | 24 | #define DEBUG_EVENT 0 |
thedo | 166:3a9487d57a5c | 25 | |
thedo | 166:3a9487d57a5c | 26 | #if (DEBUG > 3) |
thedo | 166:3a9487d57a5c | 27 | #define USB_DBG(x, ...) std::printf("[USB_DBG: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
thedo | 166:3a9487d57a5c | 28 | #else |
thedo | 166:3a9487d57a5c | 29 | #define USB_DBG(x, ...) |
thedo | 166:3a9487d57a5c | 30 | #endif |
thedo | 166:3a9487d57a5c | 31 | |
thedo | 166:3a9487d57a5c | 32 | #if (DEBUG > 2) |
thedo | 166:3a9487d57a5c | 33 | #define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
thedo | 166:3a9487d57a5c | 34 | #else |
thedo | 166:3a9487d57a5c | 35 | #define USB_INFO(x, ...) |
thedo | 166:3a9487d57a5c | 36 | #endif |
thedo | 166:3a9487d57a5c | 37 | |
thedo | 166:3a9487d57a5c | 38 | #if (DEBUG > 1) |
thedo | 166:3a9487d57a5c | 39 | #define USB_WARN(x, ...) std::printf("[USB_WARNING: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
thedo | 166:3a9487d57a5c | 40 | #else |
thedo | 166:3a9487d57a5c | 41 | #define USB_WARN(x, ...) |
thedo | 166:3a9487d57a5c | 42 | #endif |
thedo | 166:3a9487d57a5c | 43 | |
thedo | 166:3a9487d57a5c | 44 | #if (DEBUG > 0) |
thedo | 166:3a9487d57a5c | 45 | #define USB_ERR(x, ...) std::printf("[USB_ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
thedo | 166:3a9487d57a5c | 46 | #else |
thedo | 166:3a9487d57a5c | 47 | #define USB_ERR(x, ...) |
thedo | 166:3a9487d57a5c | 48 | #endif |
thedo | 166:3a9487d57a5c | 49 | |
thedo | 166:3a9487d57a5c | 50 | #if (DEBUG_TRANSFER) |
thedo | 166:3a9487d57a5c | 51 | #define USB_DBG_TRANSFER(x, ...) std::printf("[USB_TRANSFER: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
thedo | 166:3a9487d57a5c | 52 | #else |
thedo | 166:3a9487d57a5c | 53 | #define USB_DBG_TRANSFER(x, ...) |
thedo | 166:3a9487d57a5c | 54 | #endif |
thedo | 166:3a9487d57a5c | 55 | |
thedo | 166:3a9487d57a5c | 56 | #if (DEBUG_EVENT) |
thedo | 166:3a9487d57a5c | 57 | #define USB_DBG_EVENT(x, ...) std::printf("[USB_EVENT: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); |
thedo | 166:3a9487d57a5c | 58 | #else |
thedo | 166:3a9487d57a5c | 59 | #define USB_DBG_EVENT(x, ...) |
thedo | 166:3a9487d57a5c | 60 | #endif |
thedo | 166:3a9487d57a5c | 61 | |
thedo | 166:3a9487d57a5c | 62 | |
thedo | 166:3a9487d57a5c | 63 | #endif |
thedo | 166:3a9487d57a5c | 64 | |
thedo | 166:3a9487d57a5c | 65 | |
thedo | 166:3a9487d57a5c | 66 |