info.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * =====================================================================================
  3. *
  4. * ________ .__ __ ________ ____ ________
  5. * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/
  6. * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \
  7. * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \
  8. * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ /
  9. * \__> \/ \/ \/ \/ \/
  10. *
  11. * www.optixx.org
  12. *
  13. *
  14. * Version: 1.0
  15. * Created: 07/21/2009 03:32:16 PM
  16. * Author: david@optixx.org
  17. *
  18. * =====================================================================================
  19. */
  20. #ifndef __INFO_H__
  21. #define __INFO_H__
  22. #include <stdlib.h>
  23. #include <stdint.h>
  24. #include <stdarg.h>
  25. #include <avr/pgmspace.h>
  26. #if defined(NO_INFO) && defined(__GNUC__)
  27. /*
  28. * gcc's cpp has extensions; it allows for macros with a variable number of arguments. We use this extension here to preprocess pmesg away.
  29. */
  30. #define info(format, args...) ((void)0)
  31. #else
  32. void info(char *format, ...);
  33. /*
  34. * print a message, if it is considered significant enough. Adapted from [K&R2], p. 174
  35. */
  36. #endif
  37. #if defined(NO_INFO) && defined(__GNUC__)
  38. /*
  39. * gcc's cpp has extensions; it allows for macros with a variable number of arguments. We use this extension here to preprocess pmesg away.
  40. */
  41. #define info_P(format, args...) ((void)0)
  42. #else
  43. void info_P(PGM_P format, ...);
  44. /*
  45. * print a message, if it is considered significant enough. Adapted from [K&R2], p. 174
  46. */
  47. #endif
  48. #endif