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.

45 lines
1014 B

4 years ago
  1. #ifndef __USART_H
  2. #define __USART_H
  3. #include "sys.h"
  4. #include "stdio.h"
  5. //////////////////////////////////////////////////////////////////////////////////
  6. //������ֻ��ѧϰʹ�ã�δ���������ɣ��������������κ���;
  7. //ALIENTEK STM32F407������
  8. //����1��ʼ��
  9. //����ԭ��@ALIENTEK
  10. //������̳:www.openedv.com
  11. //�޸�����:2014/5/2
  12. //�汾��V1.1
  13. //��Ȩ���У������ؾ���
  14. //Copyright(C) �������������ӿƼ����޹�˾ 2014-2024
  15. //All rights reserved
  16. //********************************************************************************
  17. //�޸�˵��
  18. //V1.1 20150411
  19. //�޸�OS_CRITICAL_METHOD���ж�Ϊ��SYSTEM_SUPPORT_OS
  20. //////////////////////////////////////////////////////////////////////////////////
  21. #define USART_REC_LEN 200 //�������������ֽ��� 200
  22. #define EN_USART1_RX 1 //ʹ�ܣ�1��/��ֹ��0������1����
  23. extern u8 USART_RX_BUF[USART_REC_LEN]; //���ջ���,����USART_REC_LEN���ֽ�.ĩ�ֽ�Ϊ���з�
  24. extern u16 USART_RX_STA; //����״̬����
  25. void uart_init(u32 pclk2,u32 bound);
  26. #endif