usart.h 694 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * File : usart.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2009, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2013-11-15 bright the first version
  13. */
  14. #ifndef __USART_H__
  15. #define __USART_H__
  16. #include <rthw.h>
  17. #include <rtthread.h>
  18. #include "stm32f0xx.h"
  19. #define RT_USING_UART1
  20. #define RT_USING_UART2
  21. #define UART_ENABLE_IRQ(n) NVIC_EnableIRQ((n))
  22. #define UART_DISABLE_IRQ(n) NVIC_DisableIRQ((n))
  23. void rt_hw_usart_init(void);
  24. #endif