mraa  0.6.0
Low Level Skeleton Library for Communication on GNU/Linux platforms
 All Data Structures Namespaces Files Functions Typedefs Enumerations Enumerator Pages
Functions | Typedefs
uart.h File Reference

API Description

UART is the Universal asynchronous receiver/transmitter interface to libmraa. It allows the exposure of UART pins on supported boards. With functionality to expand at a later date.

#include "mraa.h"
int
main(int argc, char **argv)
{
mraa_uart_context uart;
uart = mraa_uart_init(0);
if (uart == NULL) {
fprintf(stdout, "UART failed to setup\n");
}
return 0;
}

Go to the source code of this file.

Functions

mraa_uart_context mraa_uart_init (int uart)
 
char * mraa_uart_get_dev_path (mraa_uart_context dev)
 

Typedefs

typedef struct _uart * mraa_uart_context
 

Function Documentation

mraa_uart_context mraa_uart_init ( int  uart)

Initialise uart_context, uses board mapping

Parameters
uartthe index of the uart set to use
Returns
uart context or NULL

Here is the caller graph for this function:

char* mraa_uart_get_dev_path ( mraa_uart_context  dev)

Get Char pointer with tty device path within Linux For example. Could point to "/dev/ttyS0"

Parameters
devuart context
Returns
char pointer of device path

Here is the caller graph for this function:

Include dependency graph for uart.h: