This determines whether the SIM card is present
Notice:
On RTCU devices without a physical card detect mechanism, the actual detection of the SIM card is performed in the power-on phase when calling gsmPower. When calling gsmSIMPresent without a former power-on with gsmPower, the SIM card detection will take extended time. It is therefore recommended to turn the GSM module on before calling gsmSIMPresent.
For devices with multiple SIM card readers the status of the currently selected reader will be returned. See gsmSelectSIM().
Input:
None.
Returns: BOOL
TRUE:
|
The SIM card is present.
|
FALSE:
|
The SIM card is not present.
|
Declaration:
FUNCTION gsmSIMPresent : BOOL;
Example:
INCLUDE rtcu.inc
PROGRAM test;
BEGIN
...
IF gsmConnected() THEN
...
ELSE
IF gsmSIMPresent() THEN
...
ELSE
...
END_IF;
END_IF;
END;
END_PROGRAM;
|