debug_lpc2xxx.c File Reference

Go to the source code of this file.

Functions

int DebugIOCtl (NUTDEVICE *dev, int req, void *conf)
 Handle I/O controls for debug device.
int DebugInit (NUTDEVICE *dev)
 Initialize debug device.
void DebugPut0 (char ch)
 Send a single character to debug device 0.
void DebugPut1 (char ch)
 Send a single character to debug device 1.
int DebugWrite (NUTFILE *fp, CONST void *buffer, int len)
 Send characters to debug device.
NUTFILEDebugOpen (NUTDEVICE *dev, CONST char *name, int mode, int acc)
 Open debug device.
int DebugClose (NUTFILE *fp)
 Close debug device.

Variables

NUTDEVICE devDebug0
 Debug device 0 information structure.
NUTDEVICE devDebug1
 Debug device 1 information structure.


Function Documentation

int DebugIOCtl ( NUTDEVICE dev,
int  req,
void *  conf 
)

Handle I/O controls for debug device.

The debug device doesn't support any.

Returns:
Always -1.

Definition at line 57 of file debug_lpc2xxx.c.

References DebugIOCtl().

int DebugInit ( NUTDEVICE dev  ) 

Initialize debug device.

Simply enable the device. 115.2 kBaud at 14.7456 MHz.

Returns:
Always 0.

Definition at line 69 of file debug_lpc2xxx.c.

References _BV, DebugInit(), and _NUTDEVICE::dev_name.

void DebugPut0 ( char  ch  ) 

Send a single character to debug device 0.

A carriage return character will be automatically appended to any linefeed.

Definition at line 101 of file debug_lpc2xxx.c.

Referenced by DebugWrite().

void DebugPut1 ( char  ch  ) 

Send a single character to debug device 1.

A carriage return character will be automatically appended to any linefeed.

Definition at line 116 of file debug_lpc2xxx.c.

Referenced by DebugWrite().

int DebugWrite ( NUTFILE fp,
CONST void *  buffer,
int  len 
)

Send characters to debug device.

A carriage return character will be automatically appended to any linefeed.

Returns:
Number of characters sent.

Definition at line 133 of file debug_lpc2xxx.c.

References CONST, DebugPut0(), DebugPut1(), DebugWrite(), _NUTDEVICE::dev_name, and _NUTFILE::nf_dev.

NUTFILE* DebugOpen ( NUTDEVICE dev,
CONST char *  name,
int  mode,
int  acc 
)

Open debug device.

Returns:
Pointer to a static NUTFILE structure.

Definition at line 155 of file debug_lpc2xxx.c.

References DebugOpen(), _NUTFILE::nf_dev, _NUTFILE::nf_fcb, and _NUTFILE::nf_next.

int DebugClose ( NUTFILE fp  ) 

Close debug device.

Returns:
Always 0.

Definition at line 169 of file debug_lpc2xxx.c.

References DebugClose().


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