TizenRT Public API  v2.0 M2
UART

Provides APIs for UART (Universal Asynchronous Receiver/Transmitter) More...

Collaboration diagram for UART:

Files

file  iotbus_uart.h
 Iotbus APIs for UART.
 

Typedefs

typedef struct _iotbus_uart_wrapper_s * iotbus_uart_context_h
 Pointer definition to the internal struct _iotbus_uart_wrapper_s. More...
 

Enumerations

Functions

iotbus_uart_context_h iotbus_uart_init (const char *path)
 initializes uart_context. More...
 
int iotbus_uart_stop (iotbus_uart_context_h hnd)
 closes uart_context. More...
 
int iotbus_uart_read (iotbus_uart_context_h hnd, char *buf, unsigned int length)
 reads data over uart bus. More...
 
int iotbus_uart_write (iotbus_uart_context_h hnd, const char *buf, unsigned int length)
 writes data over uart bus. More...
 

Detailed Description

Provides APIs for UART (Universal Asynchronous Receiver/Transmitter)

Typedef Documentation

typedef struct _iotbus_uart_wrapper_s* iotbus_uart_context_h

Pointer definition to the internal struct _iotbus_uart_wrapper_s.

Definition at line 55 of file iotbus_uart.h.

Enumeration Type Documentation

Enumeration of UART parity type.

Enumeration Details:
IOTBUS_UART_PARITY_NONE
IOTBUS_UART_PARITY_EVEN
IOTBUS_UART_PARITY_ODD

Definition at line 44 of file iotbus_uart.h.

Function Documentation

iotbus_uart_context_h iotbus_uart_init ( const char *  path)

initializes uart_context.

#include <iotbus/iotbus_uart.h>

Parameters
[in]pathuart device node path
Returns
On success, handle of uart_context is returned. On failure, NULL is returned.
Since
TizenRT v1.0
int iotbus_uart_read ( iotbus_uart_context_h  hnd,
char *  buf,
unsigned int  length 
)

reads data over uart bus.

#include <iotbus/iotbus_uart.h>

Parameters
[in]hndhandle of uart_context
[in]bufthe pointer of data buffer
[in]lengthsize to read
Returns
On success, size is returned. On failure, a negative value is returned.
Since
TizenRT v1.0
int iotbus_uart_stop ( iotbus_uart_context_h  hnd)

closes uart_context.

#include <iotbus/iotbus_uart.h>

Parameters
[in]hndhandle of uart_context
Returns
On success, 0 is returned. On failure, a negative value is returned.
Since
TizenRT v1.0
int iotbus_uart_write ( iotbus_uart_context_h  hnd,
const char *  buf,
unsigned int  length 
)

writes data over uart bus.

#include <iotbus/iotbus_uart.h>

Parameters
[in]hndhandle of uart_context
[in]bufthe pointer of data buffer
[in]lengthsize to write
Returns
On success, size is returned. On failure, a negative value is returned.
Since
TizenRT v1.0