Changeset e5dd493 in avrstuff for libs/usart/usart.h


Ignore:
Timestamp:
Sep 8, 2019, 9:09:42 AM (5 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
c956fd4
Parents:
6f22754
Message:

usart: some cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libs/usart/usart.h

    r6f22754 re5dd493  
    11/* USART i/o library
    2  * Copyright 2010-2014, Adrien Destugues <pulkomandy@pulkomandy.tk>
     2 * Copyright 2010-2019, Adrien Destugues <pulkomandy@pulkomandy.tk>
    33 * Distributed under the terms of the MIT Licence */
    44
    5 #include <stdint.h>
     5/** Initialize the USART.
     6 *
     7 * Baudrate is set according to the BAUD define.
     8 * Currently the USART is set to 8N1, except on ATmega128 where it's set to 7E1
     9 * (don't ask why, I don't remember). This should be made configurable.
     10 *
     11 * On ATmega128, this always uses the first USART.
     12 */
     13void USARTInit();
    614
    7 void USARTInit();
     15/** Write a byte to the USART.
     16 *
     17 * This function blocks if the USART is not ready to accept any data. There is
     18 * no IO buffering.
     19 */
    820void USARTWriteChar(char data);
     21
     22/** Write an 8bit integer as hex to the USART.
     23 */
    924void USARTWriteHex(unsigned char i);
     25
     26/** This function is used to read the available data from USART.
     27 *
     28 * It waits untill data is available.
     29 */
     30char USARTReadChar();
Note: See TracChangeset for help on using the changeset viewer.