Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

IXP425 UART Access (IxUARTAcc) API

IXP425 UARTAcc Driver Public API. More...


Modules

Defines for Default Values
 Default values which can be used for UART configuration.

Defines for IOCTL Commands
 IOCTL Commands (Request codes) which can be used with ixUARTIoctl.

Defines for IOCTL Arguments
 POSIX style IOCTL arguments which can be used with ixUARTIoctl.


Data Structures

struct  ixUARTDev
 Device descriptor for the UART. More...

struct  ixUARTDev
 Device descriptor for the UART. More...

struct  ixUARTStats
 Statistics for the UART. More...

struct  ixUARTStats
 Statistics for the UART. More...


Enumerations

enum  ixUARTMode {
  INTERRUPT,
  POLLED,
  LOOPBACK
}
 The mode to set to UART to. More...


Functions

PUBLIC IX_STATUS ixUARTInit (ixUARTDev *pUART)
 Initialise the UART. This puts the chip in a quiescent state.

PUBLIC IX_STATUS ixUARTPollOutput (ixUARTDev *pUART, int outChar)
 Transmit a character in polled mode.

PUBLIC IX_STATUS ixUARTPollInput (ixUARTDev *pUART, char *inChar)
 Receive a character in polled mode.

PUBLIC IX_STATUS ixUARTIoctl (ixUARTDev *pUART, int cmd, void *arg)
 Perform I/O control routines on the device.


Detailed Description

IXP425 UARTAcc Driver Public API.


Enumeration Type Documentation

enum ixUARTMode
 

The mode to set to UART to.

Enumeration values:
INTERRUPT  Interrupt mode.
POLLED  Polled mode.
LOOPBACK  Loopback mode.

Definition at line 317 of file IxUART.h.


Function Documentation

IX_STATUS ixUARTInit ixUARTDev pUART  ) 
 

Initialise the UART. This puts the chip in a quiescent state.

Parameters:
pUART - pointer to UART structure describing our device.

Precondition:
The base address for the UART must contain a valid value. Also the baud rate and hardware options must contain sensible values otherwise the defaults will be used as defined in ixUART.h
Postcondition:
UART is initialized and ready to send and receive data.
Note:
This function should only be called once per device.
Return values:
IX_SUCCESS - UART device successfully initialised.
IX_FAIL - Critical error, device not initialised.

IX_STATUS ixUARTIoctl ixUARTDev pUART,
int  cmd,
void *  arg
 

Perform I/O control routines on the device.

Parameters:
pUART - pointer to UART structure describing our device.
cmd - an ioctl request code.
arg - optional argument used to set the device mode, baud rate, and hardware options.

Return values:
IX_SUCCESS - requested feature was set/read successfully.
IX_FAIL - error setting/reading the requested feature.
See also:
IoctlCommandDefines

IoctlArgDefines

IX_STATUS ixUARTPollInput ixUARTDev pUART,
char *  inChar
 

Receive a character in polled mode.

Parameters:
pUART - pointer to UART structure describing our device.
*inChar - character read from the device.

Precondition:
UART device must be initialised.
Return values:
IX_SUCCESS - character was successfully read.
IX_FAIL - input buffer empty (try again).

IX_STATUS ixUARTPollOutput ixUARTDev pUART,
int  outChar
 

Transmit a character in polled mode.

Parameters:
pUART - pointer to UART structure describing our device.
outChar - character to transmit.

Precondition:
UART device must be initialised.
Return values:
IX_SUCCESS - character was successfully transmitted.
IX_FAIL - output buffer is full (try again).

Automatically generated from sources. © Intel Corp. 2003