Moxa DA-683-SP-W7E Руководство по программной части (Windows) онлайн [25/50] 170781

Moxa DA-683-SP-W7E Руководство по программной части (Windows) онлайн [25/50] 170781
DA-683 XPE User's Manual Software Configuration
int port=0,mode=0;
int n=0;
WCHAR sin;
WCHAR wcs_port[3],wcs_mode[3];
printf("UART Mode Test Program\n");
printf("\t (0) Exit Program\n");
printf("\t (1) Display UART Mode\n");
printf("\t (2) Set UART Mode\n");
sin=getwchar();
n=_wtoi(&sin);
do
{
switch (n)
{
// if char == '1', display the UART Mode
case 1:
printf("Input the Port Number (3,4...) = \n");
wscanf(L"%s",wcs_port);
port=_wtoi(wcs_port);
mode=uart_getmode(port);
printf("COM%d=%s\n",port,mode_array[mode]);
break;
// if char == '2', Set the UART Mode
case 2:
//Get Port Number
printf("Input the Port Number (3,4...) = \n");
wscanf(L"%s",wcs_port);
port=_wtoi(wcs_port);
//Get Mode Value
printf("Input the Mode value (0 ~ 3) = ");
wscanf(L"%s",wcs_mode);
mode=_wtoi(wcs_mode);
2-16

Содержание

Похожие устройства

Скачать