u-blox modem HTTP client test
Dependencies: UbloxUSBModem mbed
Diff: main.cpp
- Revision:
- 2:90109b8848e5
- Parent:
- 1:0112fc45285a
- Child:
- 3:03b3ef627772
--- a/main.cpp Fri Oct 18 21:05:40 2013 +0300 +++ b/main.cpp Mon Oct 21 11:48:47 2013 +0300 @@ -1,25 +1,38 @@ #include "UBloxUSBGSMModem.h" -#include "test_env.h" #include "httptest.h" #ifndef MODEM_APN #warning APN not specified, using "internet" -#define APN "internet" +#define MODEM_APN "internet" #endif #ifndef MODEM_USERNAME #warning username not specified -#define USERNAME NULL +#define MODEM_USERNAME NULL #endif #ifndef MODEM_PASSWORD #warning password not specified -#define PASSWORD NULL +#define MODEM_PASSWORD NULL #endif +void test(void const* data) +{ + UbloxUSBGSMModem modem; + httptest(modem, MODEM_APN, MODEM_USERNAME, MODEM_PASSWORD); + while (true); +} + int main() { - UbloxUSBGSMModem modem; + Thread testTask(test, NULL, osPriorityNormal, 1024 * 4); + DigitalOut led(LED1); - notify_completion(httptest(modem, APN, USERNAME, PASSWORD)); + while (true) + { + led = !led; + Thread::wait(1000); + } + return 0; } +