User`s manual

Table Of Contents
W406-LX Linux User’s Manual Programmer’s Guide
6-10
case DIO_ERROR_DURATION:
printf("DIO error duratoin\n");
case DIO_ERROR_DURATION_20MS:
printf("DIO error! The duratoin is not a multiple of 20 ms\n");
break;
}
}
return 0;
}
DIO Program Make File Example
FNAME=tdio
CC=arm-linux-gcc
STRIP=arm-linux-strip
release:
$(CC) -o $(FNAME) $(FNAME).c -lmoxalib -lpthread
$(STRIP) -s $(FNAME)
debug:
$(CC) -DDEBUG -o $(FNAME)-dbg $(FNAME).cxx -lmoxalib -lpthread
clean:
/bin/rm -f $(FNAME) $(FNAME)-dbg *.o
C Library
GPRS/SIM/SMS
The definition header file includes the entire library API; you can find it in the path
“/usr/local/arm-linux/include/libsms”.
Opens a cellular modem handle for later use.
unsigned int cellular_modem_open(void);
Inputs:
None
Return Values:
pointer to a cellular modem handle. Return 0 on failure.
Remark:
Every cellular modem API needs the cellular modem handle parameter, so you must use the
function first before you program them.