| Document ref: | 1309,424/FS expurgated |
| Project: | |
| Revision: | 0.04 |
| Date: | 18-Aug-1998 |
| Author(s): | Rich Buckley, William Turner |
| AMR: |
| Overview | |
| Technical background | |
| User interface |
This documentation describes the programmers interface provided by the new serial device driver. It is intended that any other serial/uart type devices that are to be supported under RiscOS and NC-OS will conform to this interface but use a different device name. Device names will be allocated by Acorn.
OS_Arg reason code has been allocated OSArgs_IOCtl this has the following arguments.
On entry r0 = 9 (reason code) r1 = file handle r2 -> ioctl parameter block On exit r0 preserved r1 preserved r2 preservedA new bit has been allocated in the extra filing system information word (PRM 2-523) as follows
Bit Meaning if set
3 Filing system supports OS_Arg IOCtl.
Filing systems should set this bit if they intend to support OS_Arg IOCtl. Existing filing systems will have this bit clear so will never be asked to handle this call.
If the registered filing system supports the IOCtl OS_Arg swi, the call will be dispatched using the normal entry point and reason code. It is up to the underlying filing system to impose a meaning on the registers r2-r7.
OS_Arg IOCtl.
A new DeviceFS_CallDevice reason code has been allocated DeviceCall_IOCtl this has the following arguments when received.
DeviceDriver_Entry 14 IOCtl On entry r0 = 14 (reason code) r1 = file handle r2 = stream handle r3 -> ioctl parameter block as passed in r2 of OS_Args call On exit r0 preserved r1 preserved r2 preserved r3 preservedThis call is dispatched to the underlying device driver whenever the
OS_Arg IOCtl swi is called or the swi DeviceFS_CallDevice (14) is called.
On entry r2 -> ioctl parameter block On exit r2 preservedwhere ioctl control block is a pointer to the following structure
typedef struct {
unsigned int reason : 16; /* ioctl reason code */
unsigned int group : 8; /* ioctl group code */
unsigned int reserved : 6; /* should be zero */
unsigned int read : 1; /* read flag */
unsigned int write : 1; /* write flag */
unsigned int data; /* actual data */
} ioctl_t;
In the case of an ioctl called with both read and write flags set, the returned value will be the new or latest value of the parameter being accessed.
|
by Acorn Network Computing, UK. © Acorn Computers Ltd 1997 |