This function is used to configure the system to wake from suspend on GSM activity.
It is similar to using the GSM parameter on pmWaitEvent.
pmSuspend return codes for this wake-up source:
Error
|
Type
|
Value
|
Description
|
True
|
5
|
-10
|
The GSM module is OFF.
|
True
|
5
|
-11
|
The GSM module is not in low-power mode.
|
True
|
5
|
-12
|
A voice session is active.
|
True
|
5
|
-13
|
The GSM module is busy from the last suspend.
|
True
|
5
|
-14
|
The GSM module is ON, but not selected as a wake-up source.
|
False
|
5
|
1
|
Wake-up on GSM activity.
|
Input:
Enable : BOOL (default: TRUE)
Set to true to enable the wake-up, set to false to disable it.
Returns: INT
1
|
- The system has been configured to wake.
|
0
|
- This function is not supported.
|
-1
|
- No GSM module present.
|
-2
|
- The GSM module is OFF.
|
-3
|
- The GSM module is not in low-power mode.
|
Declaration:
FUNCTION ALIGN gsmSetWakeup : INT;
VAR_INPUT
enable: BOOL := TRUE;
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM test;
BEGIN
...
gsmPowerLP(power := ON);
gsmSetWakeup(enable := ON);
...
END;
END_PROGRAM;
|