Anritsu S331D Network Router User Manual


 
case ‘3’:
CommSettings.BaudRate = CBR_38400; // rate - 38400
break;
case ‘4’:
CommSettings.BaudRate = CBR_56000; // rate - 56000
break;
case ‘5’:
CommSettings.BaudRate = CBR_115200; // rate - 115200
break;
default:
CommSettings.BaudRate = CBR_9600; //Default - 9600
break;
}
// disable null stripping
CommSettings.fNull = FALSE;
// RTS flow control
CommSettings.fRtsControl = RTS_CONTROL_ENABLE;
// XON/XOFF in flow control
CommSettings.fInX = FALSE;
// XON/XOFF out flow control
CommSettings.fOutX = FALSE;
// DTR flow control type
CommSettings.fDtrControl = DTR_CONTROL_ENABLE;
// number of bits/byte, 4-8
CommSettings.ByteSize = 8;
// 0-4=no,odd,even,mark,space
CommSettings.Parity = NOPARITY;
// 0,1,2 = 1, 1.5, 2
CommSettings.StopBits = ONESTOPBIT;
/* Setting the COM State with the changed parameters
Syntax -
BOOL SetCommState(
HANDLE hFile, // handle to communications device
LPDCB lpDCB // pointer to device-control block structure
);
*/
PortReady = SetCommState (ComHandle, &CommSettings);
/* Setting the parameters for the timeouts.
Site Master PM 115