#include <string.h>
#include <arch/arm/lpc2xxx.h>
#include <dev/debug.h>
#include <sys/device.h>
#include <sys/file.h>
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. | |
NUTFILE * | DebugOpen (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. |
int DebugIOCtl | ( | NUTDEVICE * | dev, |
int | req, | ||
void * | conf | ||
) |
Handle I/O controls for debug device.
The debug device doesn't support any.
Definition at line 57 of file debug_lpc2xxx.c.
int DebugInit | ( | NUTDEVICE * | dev | ) |
Initialize debug device.
Simply enable the device. 115.2 kBaud at 14.7456 MHz.
Definition at line 69 of file debug_lpc2xxx.c.
References _BV, 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 117 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.
Definition at line 135 of file debug_lpc2xxx.c.
References CONST, DebugPut0(), DebugPut1(), _NUTDEVICE::dev_name, and _NUTFILE::nf_dev.
Open debug device.
Definition at line 157 of file debug_lpc2xxx.c.
References _NUTFILE::nf_dev, _NUTFILE::nf_fcb, and _NUTFILE::nf_next.
int DebugClose | ( | NUTFILE * | fp | ) |