Anritsu Site Master S331D Instrukcja Użytkownika Strona 120

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 132
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 119
OPEN_EXISTING,
0, // no overlapped I/O
NULL); // null template
/* Set up the COM Ports Input and Output Buffer
Syntax -
BOOL SetupComm(
HANDLE hFile, // handle to communications device
DWORD dwInQueue, // size of input buffer
DWORD dwOutQueue // size of output buffer
);
*/
PortReady = SetupComm(ComHandle, 5000, 5000);
/* Open the existing COM Settings
Syntax -
BOOL GetCommState(
HANDLE hFile, // handle to communications device
LPDCB lpDCB // pointer to device-control block
// structure
);
*/
PortReady = GetCommState(ComHandle, &CommSettings);
/*Check to see if it was successful*/
if(!PortReady)
{
CloseHandle(ComHandle);
fclose(fp);
exit(0);
}
/* This is USed to Update the CommSettings Structure Variables*/
// Setting the Baud Rate
switch (ComBaud)
{
case ‘1’:
CommSettings.BaudRate = CBR_9600; // rate - 9600
break;
case ‘2’:
CommSettings.BaudRate = CBR_19200; // rate - 19200
break;
114 Site Master PM
Przeglądanie stron 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 131 132

Komentarze do niniejszej Instrukcji

Brak uwag