STM32_HAL_PRINTF_ATY.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * @file STM32_HAL_PRINTF_ATY.h
  3. *
  4. * @param Project DEVICE_GENERAL_ATY_LIB
  5. *
  6. * @author ATY
  7. *
  8. * @copyright
  9. * - Copyright 2017 - 2025 MZ-ATY
  10. * - This code follows:
  11. * - MZ-ATY Various Contents Joint Statement -
  12. * <a href="https://mengze.top/MZ-ATY_VCJS">
  13. * https://mengze.top/MZ-ATY_VCJS</a>
  14. * - CC 4.0 BY-NC-SA -
  15. * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
  16. * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
  17. * - Your use will be deemed to have accepted the terms of this statement.
  18. *
  19. * @brief Familiar functions of printf for STM32 device HAL lib
  20. *
  21. * @version
  22. * - 1_01_221029 > ATY
  23. * -# Preliminary version, first Release
  24. ********************************************************************************
  25. */
  26. #ifndef __STM32_HAL_PRINTF_ATY_H
  27. #define __STM32_HAL_PRINTF_ATY_H
  28. #ifndef __PRINTF_ATY
  29. #define __PRINTF_ATY
  30. #endif /* __PRINTF_ATY */
  31. #include "INCLUDE_ATY.h"
  32. #include "stdio.h"
  33. /******************************* For user *************************************/
  34. /******************************************************************************/
  35. #ifdef DEBUG_PRINTF_RECEIVE
  36. #include "stdlib.h"
  37. #include "string.h"
  38. #define PRINTF_RX_MAX_LEN 100
  39. typedef struct _uartMsgStruct{
  40. uint8_t* rx;
  41. uint8_t* tx;
  42. uint8_t rxCount;
  43. uint8_t txCount;
  44. uint8_t rcvOverFlag;
  45. } uartMsgStruct;
  46. extern struct _uartMsgStruct uartPrintfMsgStruct;
  47. void PrintfReceiveInit(void);
  48. void PrintfReceiveProcess(void);
  49. void PrintfReceiveProcess_User(struct _uartMsgStruct* ptr);
  50. #endif /* DEBUG_PRINTF_RECEIVE */
  51. #endif /* __STM32_HAL_PRINTF_ATY_H */
  52. /******************************** End Of File *********************************/