Moxa Technologies V2401 Manual de usuario Pagina 22

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 61
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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))
{
Vista de pagina 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 60 61

Comentarios a estos manuales

Sin comentarios