P100脱机下载器
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.

38 lines
1.2 KiB

4 years ago
  1. #ifndef __USART_H
  2. #define __USART_H
  3. #include "stdio.h"
  4. #include "sys.h"
  5. //////////////////////////////////////////////////////////////////////////////////
  6. //������ֻ��ѧϰʹ�ã�δ���������ɣ��������������κ���;
  7. //ALIENTEK STM32������
  8. //����1��ʼ��
  9. //����ԭ��@ALIENTEK
  10. //������̳:www.openedv.com
  11. //�޸�����:2012/8/18
  12. //�汾��V1.5
  13. //��Ȩ���У������ؾ���
  14. //Copyright(C) �������������ӿƼ����޹�˾ 2009-2019
  15. //All rights reserved
  16. //********************************************************************************
  17. //V1.3�޸�˵��
  18. //֧����Ӧ��ͬƵ���µĴ��ڲ���������.
  19. //�����˶�printf��֧��
  20. //�����˴��ڽ��������.
  21. //������printf��һ���ַ���ʧ��bug
  22. //V1.4�޸�˵��
  23. //1,�޸Ĵ��ڳ�ʼ��IO��bug
  24. //2,�޸���USART_RX_STA,ʹ�ô������������ֽ���Ϊ2��14�η�
  25. //3,������USART_REC_LEN,���ڶ��崮�������������յ��ֽ���(������2��14�η�)
  26. //4,�޸���EN_USART1_RX��ʹ�ܷ�ʽ
  27. //V1.5�޸�˵��
  28. //1,�����˶�UCOSII��֧��
  29. #define USART_REC_LEN 200 //�������������ֽ��� 200
  30. #define EN_USART1_RX 1 //ʹ�ܣ�1��/��ֹ��0������1����
  31. extern u8 USART_RX_BUF[USART_REC_LEN]; //���ջ���,����USART_REC_LEN���ֽ�.ĩ�ֽ�Ϊ���з�
  32. extern u16 USART_RX_STA; //����״̬����
  33. //�����봮���жϽ��գ��벻Ҫע�����º궨��
  34. void uart_init(u32 bound);
  35. #endif