ATtiny85 Template Code
Code snippets for the ATtiny85
 All Files Functions Variables Typedefs Enumerations Enumerator Macros
uart_recv.c File Reference
#include <avr/io.h>
#include <avr/interrupt.h>
#include "../hardware.h"
#include "uart_defs.h"
#include "softuart.h"
Include dependency graph for uart_recv.c:

Go to the source code of this file.

Functions

uint8_t uartAvail ()
 
char uartRecv ()
 

Function Documentation

uint8_t uartAvail ( )

Determine if characters are available

Check the number of characters available for immediate reading. If this function returns a non-zero value the next call to uartRecv() will be guaranteed to return immediately with a value. This function is only valid if you are using the interrupt driven version of the UART.

Returns
the number of characters available in the input buffer.

Definition at line 51 of file uart_recv.c.

char uartRecv ( )

Receive a single character

Wait for a single character on the UART and return it.

Returns
the character received.

Definition at line 65 of file uart_recv.c.