Debug.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*****************************************************************************
  2. * | File : Debug.h
  3. * | Author : Waveshare team
  4. * | Function : debug with printf
  5. * | Info :
  6. * Image scanning
  7. * Please use progressive scanning to generate images or fonts
  8. *----------------
  9. * | This version: V2.0
  10. * | Date : 2020-06-17
  11. * | Info :
  12. * 1.USE_DEBUG -> DEBUG, If you need to see the debug information,
  13. * clear the execution: make DEBUG=-DDEBUG
  14. #
  15. # Permission is hereby granted, free of charge, to any person obtaining a copy
  16. # of this software and associated documnetation files (the "Software"), to deal
  17. # in the Software without restriction, including without limitation the rights
  18. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  19. # copies of the Software, and to permit persons to whom the Software is
  20. # furished to do so, subject to the following conditions:
  21. #
  22. # The above copyright notice and this permission notice shall be included in
  23. # all copies or substantial portions of the Software.
  24. #
  25. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  26. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  27. # FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  28. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  29. # LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  30. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  31. # THE SOFTWARE.
  32. #
  33. ******************************************************************************/
  34. #ifndef __DEBUG_H
  35. #define __DEBUG_H
  36. #include <stdio.h>
  37. #if DEBUG
  38. #define Debug(__info,...) printf("Debug: " __info,##__VA_ARGS__)
  39. #else
  40. #define Debug(__info,...)
  41. #endif
  42. #endif