Moxa Technologies V2401 Manuale Utente Pagina 22

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 61
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 21
V2401/2402 WinXP User’s Manual Introduction
1-19
Also, you can set the operation mode by programming; the example “UartMode” can be found in
\examples\C++\ of the Software DVD.
The code snippet is as follows:
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 (1~4) = \n");
wscanf(L"%s",wcs_port);
port=_wtoi(wcs_port);
mode=uart_getmode(port);
if(mode==(-1))
{
Vedere la pagina 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 60 61

Commenti su questo manuale

Nessun commento