Entry | |
---|---|
R0 | 0 (reason code for Initialise) |
R2 | DeviceFS stream handle |
R3 | Flags |
Bit 0 clear for RX, else TX | |
All other bits must be zero (reserved) | |
R4 | FileSwitch stream handle [OS 4.00+] |
R6 | Pointer to special field control block |
Exit | |
---|---|
R2 | Device driver stream handle |
This entry point is called as a stream is being opened onto the device driver by DeviceFS.
The stream handle passed in must be stored, as you need to quote it when calling DeviceFS SWIs such as DeviceFS_Threshold, DeviceFS_ReceivedCharacter and DeviceFS_TransmitCharacter.
The stream handle returned will be passed by DeviceFS when calling the device driver’s other entry routines. It must not be zero, which is a reserved value.
The device driver is also passed a pointer to the special field string.
You can be assumed that the special field block will remain intact until the stream has been closed.