Serial.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /********************************************************************************
  2. * File Name: Serial.h
  3. * Function Describe: Header file for Serial.c
  4. * Explain:
  5. * Writer: ShiLiangWen
  6. * Date: 2015-1-30
  7. *******************************************************************************/
  8. #ifndef _Serial_H__
  9. #define _Serial_H__
  10. /***************************************************************************/
  11. #define COM_SEL_MCU 0
  12. #define COM_SEL_GPS 1
  13. #define COM_SEL_MODEM 2
  14. typedef enum {INF = 0, DEBUG =1} TRACE_TYPE;
  15. //#define UART_HEAD 0x7A
  16. //#define UART_END 0x7B
  17. //#define UART_TRANSFORM 0x7c
  18. #define UART1_TX_BUFFER_SIZE 100 //UART1 USE FOR PC
  19. #define UART1_RX_BUFFER_SIZE IAP_RX_BUF
  20. extern unsigned char RxBuffer1[];
  21. extern unsigned char TxBuffer1[];
  22. extern unsigned char g_ucUart1Received;//接受到一包数据标志位
  23. extern unsigned short rx1_len;
  24. void Uart1Init(void);
  25. void UART1RxTxISRHandler(void);//串口1中断中回调此函数
  26. //void IapTrace(char* format, ...);
  27. void IapTrace(char *buf);
  28. void SlwTrace(char *buf);
  29. void Uart1Send(char *txbuf,int len);
  30. /***************************************************************************/
  31. #endif