uart.h
上传用户:wybzxr
上传日期:2020-02-23
资源大小:263k
文件大小:1k
源码类别:

单片机开发

开发平台:

C/C++

  1. /*
  2.  * Copyright (c) 2006-2008 by Roland Riegel <feedback@roland-riegel.de>
  3.  *
  4.  * This file is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License version 2 as
  6.  * published by the Free Software Foundation.
  7.  */
  8. #ifndef UART_H
  9. #define UART_H
  10. #include <stdint.h>
  11. #include <avr/pgmspace.h>
  12. void uart_init();
  13. void uart_putc(uint8_t c);
  14. void uart_putc_hex(uint8_t b);
  15. void uart_putw_hex(uint16_t w);
  16. void uart_putdw_hex(uint32_t dw);
  17. void uart_putw_dec(uint16_t w);
  18. void uart_putdw_dec(uint32_t dw);
  19. void uart_puts(const char* str);
  20. void uart_puts_p(PGM_P str);
  21. uint8_t uart_getc();
  22. #endif