Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

uartspi.h File Reference

SPI UART definitions. More...

#include <sys/device.h>

Go to the source code of this file.

Data Structures

struct  _UARTSDCB
 UART device control block structure. More...


Typedefs

typedef _UARTSDCB UARTSDCB

Functions

int UartSpiInit (NUTDEVICE *dev)
 Initialize SPI UART device.

int UartSpiIOCtl (NUTDEVICE *dev, int req, void *conf)
 Perform SPI UART control functions.


Variables

NUTDEVICE devUarts []
 Device information structure.


Detailed Description

SPI UART definitions.


Function Documentation

int UartSpiInit NUTDEVICE   dev
 

Initialize SPI UART device.

Prepares the device for subsequent reading or writing.

Applications should not use this function, but call NutDeviceOpen().

Parameters:
dev  Identifies the device to initialize.
Returns:
0 on success, -1 otherwise.

int UartSpiIOCtl NUTDEVICE   dev,
int    req,
void *    conf
 

Perform SPI UART control functions.

Parameters:
dev  Identifies the device that receives the device-control function. This pointer must have been retrieved previously by using the NutDeviceOpen() function.
req  Requested control function. May be set to one of the following constants:
  • UART_SETSPEED, if conf points to an u_long value containing the baudrate.
  • UART_GETSPEED, if conf points to an u_long value receiving the current baudrate.
  • UART_SETDATABITS
  • UART_GETDATABITS
  • UART_SETPARITY
  • UART_GETPARITY
  • UART_SETSTOPBITS
  • UART_GETSTOPBITS
  • UART_SETSTATUS
  • UART_GETSTATUS
Parameters:
conf  Points to a buffer that contains any data required for the given control function or receives data from that function.
Returns:
0 on success, -1 otherwise.


Variable Documentation

NUTDEVICE devUarts[]  
 

Device information structure.

Applications must pass this structure to NutRegisterDevice() to bind this serial port device driver to the Nut/OS kernel. Having done that, the application may call NutDeviceOpen() with the name of this driver to initialize the interface.


Generated on Thu Jan 30 22:30:55 2003 for EduNet by doxygen1.2.18