Functions

uart.c File Reference

UART driver. More...

#include "uart.h"
#include <nfc/nfc.h>
#include <nfc/nfc-messages.h>
#include <sys/select.h>
#include <termios.h>

Go to the source code of this file.

Functions

int uart_receive (serial_port sp, byte_t *pbtRx, size_t *pszRxLen)
 Receive data from UART and copy data to pbtRx.
int uart_send (serial_port sp, const byte_t *pbtTx, const size_t szTxLen)
 Send pbtTx content to UART.

Detailed Description

UART driver.

This file contains 2 implementations of UART driver: first for POSIX systems, second for Windows system.

Definition in file uart.c.


Function Documentation

int uart_receive ( serial_port  sp,
byte_t *  pbtRx,
size_t *  pszRxLen 
)

Receive data from UART and copy data to pbtRx.

Returns:
0 on success, otherwise driver error code

Definition at line 214 of file uart.c.

int uart_send ( serial_port  sp,
const byte_t *  pbtTx,
const size_t  szTxLen 
)

Send pbtTx content to UART.

Returns:
0 on success, otherwise a driver error is returned

Definition at line 273 of file uart.c.