Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027_Support mbed
Fork of c027_prototyping by
Revision 12:2ed13563f48f, committed 2014-09-30
- Comitter:
- philemonf
- Date:
- Tue Sep 30 18:24:06 2014 +0000
- Parent:
- 11:5354c4819b25
- Parent:
- 10:b9ca12e9bb34
- Child:
- 14:d1f114749b3c
- Commit message:
- merge
Changed in this revision
--- a/sms_lib.cpp Tue Sep 30 18:22:15 2014 +0000
+++ b/sms_lib.cpp Tue Sep 30 18:24:06 2014 +0000
@@ -1,13 +1,12 @@
-#include "MDM.h"
-
#include "sms_lib.h"
DigitalOut myled(LED);
static MDMSerial *mdm;
-int init_sms_features(void)
+
+int init_sms_features(MDMSerial *_mdm)
{
- mdm = new MDMSerial;
+ mdm = _mdm;
static const char *SIMPIN = "5554";
@@ -24,13 +23,6 @@
return mdmOk;
}
-void close_sms_features(void)
-{
- if (mdm) {
- delete mdm;
- }
-}
-
int send_sms(struct sms_data_t *sms)
{
--- a/sms_lib.h Tue Sep 30 18:22:15 2014 +0000
+++ b/sms_lib.h Tue Sep 30 18:24:06 2014 +0000
@@ -1,13 +1,14 @@
#ifndef __SMS_LIB_H__
#define __SMS_LIB_H__
+#include "MDM.h"
+
struct sms_data_t {
char *phone_num;
char *msg_buf;
};
-int init_sms_features(void);
-void close_sms_features(void);
+int init_sms_features(MDMSerial *_mdm);
int send_sms(struct sms_data_t *sms);
int read_sms(struct sms_data_t *sms);
