#include <conf.h>
#include <stddef.h>


Go to the source code of this file.
Defines | |
| #define | isbaddev(f) ( !(0 <= (f) && (f) < NDEVS) ) |
| Check that device id is between 0 and NDEVS. | |
Functions | |
| devcall | close (int) |
| close - close a device | |
| devcall | control (int, int, long, long) |
| control - control a device (e.g., set the mode) | |
| devcall | getc (int) |
| getc - get one character from a device | |
| devcall | open (int,...) |
| open - open a connection to a device/file (params 2 & 3 are optional) | |
| devcall | putc (int, char) |
| putc - write a single character to a device | |
| devcall | read (int, void *, uint) |
| read - read one or more bytes from a device | |
| devcall | write (int, void *, uint) |
| write - write 1 or more bytes to a device | |
| devcall | seek (int, long) |
| seek - position a device (very common special case of control) | |
| syscall | getdev (char *) |
| Returns the numerical identifier for the given device. | |
Contains all definitions relating to the XINU device subsystem.
Definition in file device.h.
| #define isbaddev | ( | f | ) | ( !(0 <= (f) && (f) < NDEVS) ) |
| devcall close | ( | int | descrp | ) |
| devcall control | ( | int | descrp, | |
| int | func, | |||
| long | arg1, | |||
| long | arg2 | |||
| ) |
control - control a device (e.g., set the mode)
| descrp | definition of device to control | |
| func | specific control function for device | |
| arg1 | specific argument for func | |
| arg2 | specific argument for func |
Definition at line 20 of file control.c.
References isbaddev, and SYSERR.
Referenced by etherWrite(), and shell().

| devcall getc | ( | int | descrp | ) |
getc - get one character from a device
| descrp | definition of device from which to acquire character |
Definition at line 17 of file getc.c.
Referenced by fgetc(), fgets(), and getch().

| syscall getdev | ( | char * | dev | ) |
| devcall open | ( | int | descrp, | |
| ... | ||||
| ) |
open - open a connection to a device/file (params 2 & 3 are optional)
| descrp | definition of device to open |
Definition at line 18 of file open.c.
References isbaddev, and SYSERR.
Referenced by etherStart(), and nulluser().

| devcall putc | ( | int | descrp, | |
| char | ch | |||
| ) |
putc - write a single character to a device
| descrp | definition of device on which to write | |
| ch | character to write |
Definition at line 18 of file putc.c.
Referenced by fprintf(), fputc(), and fputs().

read - read one or more bytes from a device
| descrp | definition of device from which to read | |
| *buffer | pointer into read-to location | |
| count | length of buffer |
Definition at line 19 of file read.c.
References isbaddev, and SYSERR.
Referenced by shell().

| devcall seek | ( | int | descrp, | |
| long | pos | |||
| ) |
1.5.5