output.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // output.h :
  2. //
  3. #if !defined(AGD_OUTPUT_H__77A3E0A7_F59F_49E5_950F_D3465B3FDCAB__INCLUDED_)
  4. #define AGD_OUTPUT_H__77A3E0A7_F59F_49E5_950F_D3465B3FDCAB__INCLUDED_
  5. #include <gfabootlmast.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif // __cplusplus
  9. /////////////////////////////////////////////////////////////////////////////
  10. // output.h - Declarations:
  11. #define TRACE(...) fprintf(stdout, __VA_ARGS__), fflush(stdout)
  12. #define ETRACE(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
  13. #define TRACE0(...) GfaTfuPrintF(0, __VA_ARGS__)
  14. #define TRACE1(...) GfaTfuPrintF(1, __VA_ARGS__)
  15. #define TRACE2(...) GfaTfuPrintF(2, __VA_ARGS__)
  16. #define TRACE3(...) GfaTfuPrintF(3, __VA_ARGS__)
  17. #define TRACE4(...) GfaTfuPrintF(4, __VA_ARGS__)
  18. /////////////////////////////////////////////////////////////////////////////
  19. int GfaTfuPrintF(int verb, const char *pszFormat, ...);
  20. void GfaTfuDumpImageInfo(const char *pszContext, LPCGFA_IMG_INFO pii);
  21. void GfaTfuOnDownloadStatus(const char *pszFile, int nLine, uint8_t nNodeAddr, uint32_t nFlashStartAddr, uint32_t nCbData, int nCtx, int nErrorCode);
  22. void GfaTfuOnSendDataStatus(const char *pszFile, int nLine, uint8_t nNodeAddr, uint32_t nCbBlock, uint32_t nCbData, int nCtx, int nErrorCode);
  23. /////////////////////////////////////////////////////////////////////////////
  24. #ifdef __cplusplus
  25. }
  26. #endif // __cplusplus
  27. #endif // !defined(AGD_OUTPUT_H__77A3E0A7_F59F_49E5_950F_D3465B3FDCAB__INCLUDED_)