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 C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: common.h
- Revision:
- 32:56804dd00193
- Parent:
- 27:bfd402593acc
--- a/common.h Mon May 26 08:26:01 2014 +0000
+++ b/common.h Wed May 28 17:51:12 2014 +0000
@@ -8,6 +8,9 @@
#include "MbedSmartRest.h"
#include "rtos.h"
+#define CREDENTIALS_FILE "001_CREDENTIALS"
+#define CREDENTIALS_BUFFER 256
+
#define A0 P0_23
#define A1 P0_24
#define A2 P0_25
@@ -42,6 +45,12 @@
uint8_t ber; // BER in %
} sigq_t;
+typedef struct
+{
+ char username[128];
+ char password[128];
+} credentials_t;
+
extern C027 c027;
//extern UbloxUSBGSMModem modem;
extern MbedSmartRest client;
@@ -51,6 +60,10 @@
const char * cellId();
const char * iccid();
sigq_t * signalQuality();
+void credentials_set(credentials_t *dst, const char *tenant, const char *username, const char *password);
+bool credentials_read(credentials_t *dst);
+void credentials_write(credentials_t *src);
+void credentials_reset();
int program(void);
#endif
\ No newline at end of file
