Data Structures | |
struct | _NUTDEVICE |
Device structure. More... | |
struct | _NUTDEVICE |
Device structure. More... | |
struct | _NUTVIRTUALDEVICE |
Virtual device structure. More... | |
struct | _NUTVIRTUALDEVICE |
Virtual device structure. More... | |
Defines | |
#define | IFTYP_RAM |
RAM device. | |
#define | IFTYP_ROM |
ROM device. | |
#define | IFTYP_STREAM |
Stream device. | |
#define | IFTYP_NET |
Net device. | |
#define | IFTYP_TCPSOCK |
TCP socket. | |
#define | IFTYP_CHAR |
Character stream device. | |
Typedefs | |
typedef _NUTDEVICE | NUTDEVICE |
Device structure type. | |
typedef _NUTVIRTUALDEVICE | NUTVIRTUALDEVICE |
Device structure type. | |
Functions | |
int | NutDeviceClose (NUTDEVICE *dev) |
Closes a previously opened stream device. | |
int | NutDeviceIOCtl (NUTDEVICE *dev, int req, void *conf) |
Perform device specific control functions. | |
NUTDEVICE * | NutDeviceOpen (CONST char *name) |
Open a device by name. | |
int | NutDeviceRead (NUTDEVICE *dev, void *data, int size) |
Read up to a specified number of bytes from a device. | |
int | NutDeviceGetLine (NUTDEVICE *dev, void *data, int size) |
Get a line from a specified device. | |
NUTDEVICE * | NutDeviceLookup (CONST char *name) |
Find device entry by name. | |
int | NutRegisterDevice (NUTDEVICE *dev, u_short base, u_char irq) |
Register and initialize a device. | |
int | NutDeviceWrite (NUTDEVICE *dev, CONST void *data, int len) |
Write a buffer to a specified device. | |
int | NutDeviceWrite_P (NUTDEVICE *dev, PGM_P data, int len) |
Write a buffer in program space to a specified device. | |
Variables | |
NUTDEVICE * | nutDeviceList |
Linked list of all registered devices. |
|
Device structure type.
|
|
Device structure type.
|
|
Closes a previously opened stream device. The calling thread may be suspended until all buffered output data has been sent.
|
|
Get a line from a specified device. Reads a string from the specified device. Characters are read up to and including the first newline character, up to the end of the stream, or until the number of characters read is equal to the specified size, whichever comes first.
|
|
Perform device specific control functions.
|
|
Find device entry by name.
|
|
Open a device by name. This function must be called after registering the device with NutRegisterDevice() and before calling any read or write function.
|
|
Read up to a specified number of bytes from a device. The function may read fewer than the given number of bytes.
|
|
Write a buffer to a specified device. This is a raw output without any character translation like EOL (end of line).
|
|
Write a buffer in program space to a specified device. This is a raw output without any character translation like EOL (end of line).
|
|
Register and initialize a device. Initializes the device and adds it to the system device list. Applications should call this function during initialization for each device they intend to use.
|
|
Linked list of all registered devices.
|