aboutsummaryrefslogtreecommitdiff
path: root/libraries/GSM/GSM3ShieldV1BaseProvider.cpp
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-04-03 13:51:04 +0200
committerCristian Maglie <c.maglie@bug.st>2013-04-03 13:51:04 +0200
commitee90e68e86dd61d86f5d17b69080338328765b22 (patch)
treee620c0edc2690ab789b665e567910640597aa6fe /libraries/GSM/GSM3ShieldV1BaseProvider.cpp
parent0ecdc5ebc96ad4c7c548c438a03d9ce00679db8b (diff)
parentf50c307be280dc6ece9e70c43b301c1db36291a0 (diff)
Merged 1.0.5
Merge remote-tracking branch 'arduino/master' into ide-1.5.x Conflicts: app/src/processing/app/Base.java build/shared/revisions.txt hardware/arduino/avr/cores/arduino/malloc.c hardware/arduino/cores/arduino/avr-libc/malloc.c hardware/arduino/cores/arduino/malloc.c todo.txt
Diffstat (limited to 'libraries/GSM/GSM3ShieldV1BaseProvider.cpp')
-rw-r--r--libraries/GSM/GSM3ShieldV1BaseProvider.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/libraries/GSM/GSM3ShieldV1BaseProvider.cpp b/libraries/GSM/GSM3ShieldV1BaseProvider.cpp
new file mode 100644
index 0000000..d63967b
--- /dev/null
+++ b/libraries/GSM/GSM3ShieldV1BaseProvider.cpp
@@ -0,0 +1,27 @@
+#include <GSM3ShieldV1BaseProvider.h>
+#include <GSM3ShieldV1ModemCore.h>
+#include <Arduino.h>
+
+// Returns 0 if last command is still executing
+// 1 if success
+// >1 if error
+int GSM3ShieldV1BaseProvider::ready()
+{
+ theGSM3ShieldV1ModemCore.manageReceivedData();
+
+ return theGSM3ShieldV1ModemCore.getCommandError();
+};
+
+void GSM3ShieldV1BaseProvider::prepareAuxLocate(PROGMEM prog_char str[], char auxLocate[])
+{
+ int i=0;
+ char c;
+
+ do
+ {
+ c=pgm_read_byte_near(str + i);
+ auxLocate[i]=c;
+ i++;
+ } while (c!=0);
+}
+