IOCTL_FARC_EXTND_FUNCTIONS
Description:
set/get extended parameters (20022, 20020C and SH IP-CORE-ARCCTRL only)
Such as:
- clock multiplier for speed settings above 2,5Mbit/s, i.e. 5Mbit/s and 10 Mbit/s
- divider for the recon timer, that is use for shortened network reconfiguration periods.
- receive all mode, that allow to receive all valid data packets on the network, regardless of their destination ID.
This control code must be executed before IOCTL_FARC_INIT.
New values only take effect by performing a IOCTL_FARC_INIT
Parameters:
Parameter |
Type |
Description |
Input |
new settings |
struct ARCNET_EXTND |
The new setting values |
Output |
old settings |
struct ARCNET_EXTND |
The previous setting values |
Possible errors (see also Error codes):
E_FARC_INVALID_HANDLE
E_FARC_BUFFER_TOO_SMALL
Notes:
1) ReceiveAll feature is not supported by SH ARC-66
2) SH ARC-USB supports ReceiveAll since driver version v4.4
Example:
Note, that the following example is only a fragment. It is recommended,
that the driver is opened in asynchronous mode and a handle to the driver is available.
OVERLAPPED overlapped;
DWORD read, err;
BOOL ret;
ARCNET_EXTND extnd_new, extnd_old;
overlapped.Offset = 0;
overlapped.OffsetHigh = 0;
overlapped.hEvent = CreateEvent(NULL,TRUE,FALSE,NULL);
...
// Set Clock multiplier of 20020C
// new baudrate: 5 Mpbs
extnd_new.z_ckup_0 = 1;
extnd_new.z_ckup_1 = 0;
extnd_new.z_receiveall = 0;
ret = DeviceIoControl(drvhandle,
IOCTL_FARC_EXTND_FUNCTIONS,
&extnd_new, sizeof(extnd_new),
&extnd_old, sizeof(extnd_old),
&read, &overlapped);
if (!ret)
{
err = GetLastError();
if (err == E_FARC_PENDING)
{
ret = GetOverlappedResult(drvhandle, &overlapped, &read, TRUE);
if (!ret)
{
err = GetLastError();
// do errorhandling here
}
}
else
{
// other error occured, perhaps wrong handle
}
}
// Now do DeviceIoControl(..., IOCTL_FARC_INIT, ...)
...
See also:
DeviceIoControl()
IOCTL_FARC_INIT
ARCNET_EXTND