You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

printf.h 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. **--------------ļϢ--------------------------------------------------------------------------------
  3. ** : printf.h
  4. ** : Ʒ
  5. **޸:
  6. ** :
  7. ** ̼ϢV3.4.0
  8. **--------------ʷ汾Ϣ----------------------------------------------------------------------------
  9. ** : Ʒ
  10. ** : v0.01
  11. ** ա:
  12. ** 衡: ԭʼ汾
  13. **
  14. **--------------ǰ汾Ϣ----------------------------------------------------------------------------
  15. ** : Ʒ
  16. ** : v0.01
  17. ** ա:
  18. ** 衡: ǰ汾
  19. **
  20. **------------------------------------------------------------------------------------------------------*/
  21. #ifndef PRINTF_H
  22. #define PRINTF_H
  23. #include "stm32f10x.h"
  24. #include "stdio.h"
  25. #include "printf.h"
  26. #define USART_REC_LEN 200 //ֽ 200
  27. #define USART_APP_LEN 20*1024 //ֽ 20K
  28. #define APP 1
  29. #define APP1 1
  30. #define CONSOLE_UART USART1 //Կ
  31. void USART_Configuration(void);
  32. void Usart1_SendData(u8 *DatBuf, u32 len);
  33. void SendConsoleByte(char d);
  34. void SendConsoleStr(char *d);
  35. void SendConsoleData(char *d, u16 len);
  36. char SendUartData(char *s, u16 len, USART_TypeDef* Uart);
  37. void SendUSART2Byte(char d);
  38. void SendUSART2Str(char *d);
  39. unsigned char HexToAscii(unsigned char hexData);
  40. void DegugPrintf(unsigned char *str,unsigned char len);
  41. #define USART1_EN 1
  42. #define USART3_EN 1
  43. #define EN_USART1_RX 1
  44. #define EN_USART3_RX 1
  45. extern u8 USART3_RX_BUF[USART_REC_LEN];
  46. extern u8 USART3_TX_CNT; //ͼ
  47. extern u8 USART3_RX_CNT; //ռ
  48. extern u16 USART3_REC_Status; //ɱ־λ
  49. extern u8 USART1_RX_BUF[USART_REC_LEN]; //ջ,USART_REC_LENֽ.
  50. extern u8 USART1_TX_CNT; //ͼ
  51. extern volatile u8 USART1_RX_CNT; //ռ
  52. extern u16 USART1_REC_Status; //ɱ־λ
  53. extern volatile unsigned char UARTtoConsole_RxBuffer[100];
  54. extern volatile unsigned char UARTtoConsole_RxBufferWr ;
  55. extern volatile unsigned char UARTtoConsole_RxBufferRd ;
  56. #endif