User`s manual
Table Of Contents
- 1. Introduction
- 2. Getting Started
- Powering on the W406-LX
- Connecting the W406-LX to a PC
- Configuring the Ethernet Interface
- USB Port for Expansion
- SD Socket for Storage Expansion
- Setting Up the Wireless Module
- Configuring the SIM Card
- Entering the PIN Code
- Verifying the SIM Card Status
- Enabling or Disabling the PIN Code Authentication
- Changing the PIN Code
- Unlocking the SIM Card
- Connecting to the Internet
- Reconnecting to the Internet
- Disconnecting from the Internet
- Detecting an Internet Connection Error
- Sending and Reading an SMS Message
- Deleting an SMS Message
- Test Program—Developing Hello.c
- 3. Managing Embedded Linux
- 4. Managing Communications
- 5. Development Tool Chains
- 6. Programmer’s Guide
- 7. Software Lock
- A. System Commands

W406-LX Linux User’s Manual Programmer’s Guide
6-18
Gets one of the DIN inputs.
int mxdio_get_din(HANDLE hDIO, unsigned int port);
Inputs:
<hDIO> the DIO handle
<port> the port index, from 0 to 3 mapping to DI0~DI3
Return Values:
1 indicates HIGH, 0 indicates LOW
Remark:
Gets one of DOUT outputs.
int mxdio_get_dout(HANDLE handle_dio,unsigned int port);
Inputs:
<hDIO> the DIO handle
<port> the port index, from 0 to 3 mapping to DO0~DO3
Return Values:
1 indicates HIGH, 0 indicates LOW
Remark:
Watchdog
Opens a watchdog handle for later use.
HANDLE watchdog_init(DWORD dwRefreshPeriod);
Inputs:
<dwRefreshPeriod> the watchdog refresh time interval in milliseconds..
Return Values:
the watchdog handle, INVALID_HANDLE_VALUE indicates failure.
Remark:
After calling the watchdog_init(), you must call watchdog_refresh() in the specified
time(dwRefreshPeriod) or the system will be triggered rebooting.
Watchdog refresh function call.
BOOL watchdog_refresh(HANDLE hWdg, DWORD dwRefreshPeriod);
Inputs:
<hWdg> the watchdog handle from watchdog_init() returned
Return Values:
TRUE indicates the watchdog refresh succeed, FALSE indicates refresh failure.
Remark:
Closes the watchdog handle.
BOOL watchdog_release(HANDLE hWdg);
Inputs:
<hWdg> the watchdog handle watchdog_init() returned
Return Values:
TRUE indicates the watchdog refresh succeed, FALSE indicates refresh failure.
Remark: