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

XgACEStatus


Detailed Description

ACE device status flags,.

A combination of these status flags is used by the _ioctl() commands ACE_SETSTATUS and ACE_GETSTATUS.


Modules

 XgACEHS
 ACE handshake modes.

[NOHEADER]

#define ACE_FRAMINGERROR   0x00000001UL
 Framing error.
#define ACE_OVERRUNERROR   0x00000002UL
 Overrun error.
#define ACE_PARITYERROR   0x00000004UL
 Parity error.
#define ACE_ERRORS   (ACE_FRAMINGERROR | ACE_OVERRUNERROR | ACE_PARITYERROR)
 ACE errors.
#define ACE_RXBUFFEREMPTY   0x00000040UL
 Receiver buffer empty.
#define ACE_TXBUFFEREMPTY   0x00000080UL
 Transmitter buffer empty.
#define ACE_RTSENABLED   0x00000100UL
 RTS handshake output enabled.
#define ACE_RTSDISABLED   0x00000200UL
 RTS handshake output disabled.
#define ACE_CTSENABLED   0x00000400UL
 CTS handshake input enabled.
#define ACE_CTSDISABLED   0x00000800UL
 CTS handshake input disabled.
#define ACE_DTRENABLED   0x00001000UL
 DTR handshake output enabled.
#define ACE_DTRDISABLED   0x00002000UL
 DTR handshake output disabled.
#define ACE_RXENABLED   0x00010000UL
 Receiver enabled.
#define ACE_RXDISABLED   0x00020000UL
 Receiver enabled.
#define ACE_TXENABLED   0x00040000UL
 Transmitter enabled.
#define ACE_TXDISABLED   0x00080000UL
 Transmitter enabled.

Functions

int AceInit (NUTDEVICE *dev)
 Initialize on chip ACE device.
int AceIOCtl (NUTDEVICE *dev, int req, void *conf)
 Perform ACE control functions.
int AceInput (NUTDEVICE *dev)
 Wait for input.
int AceOutput (NUTDEVICE *dev)
 Initiate output.
int AceFlush (NUTDEVICE *dev)
 Wait for output buffer empty.
int AceGetRaw (u_char *cp)
int AcePutRaw (u_char ch)
int AceRead (NUTFILE *fp, void *buffer, int size)
 Read from device.
int AceWrite (NUTFILE *fp, CONST void *buffer, int len)
int AceWrite_P (NUTFILE *fp, PGM_P buffer, int len)
NUTFILEAceOpen (NUTDEVICE *dev, CONST char *name, int mode, int acc)
 Open a device or file.
long AceSize (NUTFILE *fp)
 Request file size.
int AceClose (NUTFILE *fp)
 Close a device or file.


Define Documentation

#define ACE_FRAMINGERROR   0x00000001UL
 

Framing error.

ACE_SETSTATUS will clear this error.

#define ACE_OVERRUNERROR   0x00000002UL
 

Overrun error.

ACE_SETSTATUS will clear this error.

#define ACE_PARITYERROR   0x00000004UL
 

Parity error.

ACE_SETSTATUS will clear this error.

#define ACE_ERRORS   (ACE_FRAMINGERROR | ACE_OVERRUNERROR | ACE_PARITYERROR)
 

ACE errors.

ACE_SETSTATUS will clear all errors.

#define ACE_TXBUFFEREMPTY   0x00000080UL
 

Transmitter buffer empty.

ACE_SETSTATUS will immediately clear the buffer. It will not wait until the remaining characters have been transmitted.


Function Documentation

int AceInit NUTDEVICE dev  ) 
 

Initialize on chip ACE device.

Prepares the device for subsequent reading or writing. Enables ACE transmitter and receiver interrupts.

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

int AceIOCtl NUTDEVICE dev,
int  req,
void *  conf
 

Perform ACE control functions.

Parameters:
dev Identifies the device that receives the device-control function.
req Requested control function. May be set to one of the following constants:
  • ACE_SETSPEED, conf points to an u_long value containing the baudrate.
  • ACE_GETSPEED, conf points to an u_long value receiving the current baudrate.
  • ACE_SETDATABITS, conf points to an u_long value containing the number of data bits, 5, 6, 7 or 8.
  • ACE_GETDATABITS, conf points to an u_long value receiving the number of data bits, 5, 6, 7 or 8.
  • ACE_SETPARITY, conf points to an u_long value containing the parity, 0 (no), 1 (odd) or 2 (even).
  • ACE_GETPARITY, conf points to an u_long value receiving the parity, 0 (no), 1 (odd) or 2 (even).
  • ACE_SETSTOPBITS, conf points to an u_long value containing the number of stop bits 1 or 2.
  • ACE_GETSTOPBITS, conf points to an u_long value receiving the number of stop bits 1 or 2.
  • ACE_SETSTATUS
  • ACE_GETSTATUS
  • ACE_SETREADTIMEOUT, conf points to an u_long value containing the read timeout.
  • ACE_GETREADTIMEOUT, conf points to an u_long value receiving the read timeout.
  • ACE_SETWRITETIMEOUT, conf points to an u_long value containing the write timeout.
  • ACE_GETWRITETIMEOUT, conf points to an u_long value receiving the write timeout.
  • ACE_SETLOCALECHO, conf points to an u_long value containing 0 (off) or 1 (on).
  • ACE_GETLOCALECHO, conf points to an u_long value receiving 0 (off) or 1 (on).
  • ACE_SETFLOWCONTROL, conf points to an u_long value containing combined ACE_FCTL_ values.
  • ACE_GETFLOWCONTROL, conf points to an u_long value containing receiving ACE_FCTL_ values.
  • ACE_SETCOOKEDMODE, conf points to an u_long value containing 0 (off) or 1 (on).
  • ACE_GETCOOKEDMODE, conf points to an u_long value receiving 0 (off) or 1 (on).
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.
Warning:
Timeout values are given in milliseconds and are limited to the granularity of the system timer. To disable timeout, set the parameter to NUT_WAIT_INFINITE.

int AceInput NUTDEVICE dev  ) 
 

Wait for input.

This function checks the input buffer for any data. If the buffer is empty, the calling thread will be blocked until at least one new character is received or a timeout occurs.

Parameters:
dev Indicates the ACE device.
Returns:
0 on success, -1 on timeout.

int AceOutput NUTDEVICE dev  ) 
 

Initiate output.

This function checks the output buffer for any data. If the buffer contains at least one character, the transmitter is started, if not already running. The function returns immediately, without waiting for the character being completely transmitted. Any remaining characters in the output buffer are transmitted in the background.

Parameters:
dev Indicates the ACE device.
Returns:
0 on success, -1 otherwise.

int AceFlush NUTDEVICE dev  ) 
 

Wait for output buffer empty.

If the output buffer contains any data, the calling thread is suspended until all data has been transmitted.

Parameters:
dev Indicates the ACE device.
Returns:
0 on success, -1 otherwise.


© 2000-2006 by egnite Software GmbH - visit http://www.ethernut.de/