Guest User

Untitled

a guest
Jan 22nd, 2018
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. /**
  2. * @file NexConfig.h
  3. *
  4. * Options for user can be found here.
  5. *
  6. * @author Wu Pengfei (email:<pengfei.wu@itead.cc>)
  7. * @date 2015/8/13
  8. * @copyright
  9. * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. */
  15. #ifndef __NEXCONFIG_H__
  16. #define __NEXCONFIG_H__
  17.  
  18. /**
  19. * @addtogroup Configuration
  20. * @{
  21. */
  22.  
  23. /**
  24. * Define DEBUG_SERIAL_ENABLE to enable debug serial.
  25. * Comment it to disable debug serial.
  26. */
  27. //#define DEBUG_SERIAL_ENABLE
  28.  
  29. /**
  30. * Define dbSerial for the output of debug messages.
  31. */
  32. #define dbSerial Serial
  33.  
  34. /**
  35. * Define nexSerial for communicate with Nextion touch panel.
  36. */
  37. // #define nexSerial Serial2
  38. #include <SoftwareSerial.h>
  39. extern SoftwareSerial HMISerial;
  40. #define nexSerial HMISerial
  41.  
  42. #ifdef DEBUG_SERIAL_ENABLE
  43. #define dbSerialPrint(a) dbSerial.print(a)
  44. #define dbSerialPrintln(a) dbSerial.println(a)
  45. #define dbSerialBegin(a) dbSerial.begin(a)
  46. #else
  47. #define dbSerialPrint(a) do{}while(0)
  48. #define dbSerialPrintln(a) do{}while(0)
  49. #define dbSerialBegin(a) do{}while(0)
  50. #endif
  51.  
  52. /**
  53. * @}
  54. */
  55.  
  56. #endif /* #ifndef __NEXCONFIG_H__ */
Add Comment
Please, Sign In to add comment