only for STM32F769NI-DISCOVERY, porting from mbed OS5 unsupport functions

Committer:
kenjiArai
Date:
Wed Aug 07 05:33:53 2019 +0000
Revision:
0:dae1ac0c0a7b
only for STM32F769NI-DISCOVERY, porting from mbed OS5 unsupport functions

Who changed what in which revision?

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