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.
Fork of GSwifi_old by
Revision 16:aea56cce3bf5, committed 2012-10-18
- Comitter:
- gsfan
- Date:
- Thu Oct 18 02:21:27 2012 +0000
- Parent:
- 15:5febfc399099
- Child:
- 17:6828b084e74b
- Commit message:
- fix
Changed in this revision
| GSwifi.cpp | Show annotated file Show diff for this revision Revisions of this file |
| GSwifi.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/GSwifi.cpp Tue Oct 09 16:05:40 2012 +0000
+++ b/GSwifi.cpp Thu Oct 18 02:21:27 2012 +0000
@@ -64,12 +64,12 @@
}
#elif defined(TARGET_LPC11U24)
if (p_cts == p21) { // CTS input (P0_7)
- LPC_USART->MCR = (1<<7); // CTSEN
+ LPC_USART->MCR |= (1<<7); // CTSEN
LPC_IOCON->PIO0_7 &= ~0x07;
LPC_IOCON->PIO0_7 |= 0x01; // UART CTS
}
if (p_rts == p22) { // RTS output (P0_17)
- LPC_USART->MCR = (1<<6); // RTSEN
+ LPC_USART->MCR |= (1<<6); // RTSEN
LPC_IOCON->PIO0_17 &= ~0x07;
LPC_IOCON->PIO0_17 |= 0x01; // UART RTS
_rts = true;
@@ -857,7 +857,7 @@
void GSwifi::poll() {
int i, j;
- if (_gs_enter) {
+ while (_gs_enter) {
// received "\n"
char buf[GS_CMD_SIZE];
@@ -896,7 +896,8 @@
} else
if (strncmp(buf, "DISASSOCIATED", 13) == 0 ||
strncmp(buf, "Disassociated", 13) == 0 ||
- strncmp(buf, "UnExpected", 10) == 0) {
+ strncmp(buf, "Disassociation Event", 20) == 0 ||
+ strncmp(buf, "UnExpected Warm Boot", 20) == 0) {
_connect = false;
for (i = 0; i < 16; i ++) {
_gs_sock[i].connect = false;
@@ -904,14 +905,14 @@
} else
if (strncmp(buf, "Out of StandBy-Timer", 20) == 0 ||
strncmp(buf, "Out of StandBy-Alarm", 20) == 0) {
- if (_status == GSSTAT_STANDBY) {
+// if (_status == GSSTAT_STANDBY) {
_status = GSSTAT_WAKEUP;
- }
+// }
} else
if (strncmp(buf, "Out of Deep Sleep", 17) == 0 ) {
- if (_status == GSSTAT_DEEPSLEEP) {
+// if (_status == GSSTAT_DEEPSLEEP) {
_status = GSSTAT_READY;
- }
+// }
} else
if (strncmp(buf, "Out of", 6) == 0) {
}
--- a/GSwifi.h Tue Oct 09 16:05:40 2012 +0000 +++ b/GSwifi.h Thu Oct 18 02:21:27 2012 +0000 @@ -29,7 +29,7 @@ #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) #define GS_DATA_SIZE 1500 #elif defined(TARGET_LPC11U24) -#define GS_DATA_SIZE 800 +#define GS_DATA_SIZE 500 #endif /**
