![Telit Wireless Solutions GM862GPS Series Technical Manual Download Page 41](http://html1.mh-extra.com/html/telit-wireless-solutions/gm862gps-series/gm862gps-series_technical-manual_1083661041.webp)
TECHNICAL MANUAL
Telit GM862-GPS
Quad Band GPS Data Terminal Module
Pag.41 of 79
Rev. 0
Second input parameter value is a Python integer which is the ouput value. It can be 0 or
1. It is only used if direction value is 1.
Third input parameter value is a Python integer which is the direction value. It can be 0 for
input or 1 for output.
Return value is a Python integer which is -1 if an error occurred otherwise is 1.
Example:
c = GPIO.setIOdir(4, 0, 0)
sets GPIO 4 to input with value having no meaning, assigning return value to c.
3.13.4.4 GPIO.getIOdir(GPIOnumber)
Gets direction of a GPIO.
Input parameter GPIOnumber is a Python integer which is the number of the GPIO.
Return value is a Python integer which is -1 if an error occurred otherwise is direction
value. It is 0 for input or 1 for output.
Example:
d = GPIO.getIOdir(7)
gets GPIO 7 direction, assigning return value to d.
3.13.5 MOD built-in module
MOD built-in module is the interface between Python and module miscellaneous functions.
You need to use MOD built-in module if you want to generate timers in Python script, to
reactivate Python from Python script, etc.
If you want to use MOD built-in module you need to import it first:
import MOD
then you can use MOD built-in module methods like in the following example:
MOD.reactivatePython()
which reactivates Python after next exiting from Python script.
More details about MOD built-in module methods are in the following paragraphs.
3.13.5.1 MOD.secCounter()
Returns seconds elapsed since 1 January 1970.
This method is useful for timers generation in Python script.
No input parameter.
Return value is a Python integer which is the value of seconds elapsed since 1 January
1970.
Example:
a = MOD.secCounter()
returns seconds elapsed since 1 January 1970.
3.13.5.2 MOD.sleep(sleeptime)
Blocks Python script execution for a given time returning the resources to the system.
Input parameter timesleep is a Python integer which is the time in 1/10 s to block script
execution.
No return value.
Example:
MOD.sleep(15)
blocks Python script for 1.5 s.