|
|
@ -265,25 +265,20 @@ void loop() {
|
|
|
|
|
|
|
|
|
|
|
|
int dataLength = 0;
|
|
|
|
int dataLength = 0;
|
|
|
|
|
|
|
|
|
|
|
|
#define STATE_G 0
|
|
|
|
#define STATE_GET 0
|
|
|
|
#define STATE_E 1
|
|
|
|
|
|
|
|
#define STATE_T 2
|
|
|
|
|
|
|
|
#define STATE_SPACE 3
|
|
|
|
|
|
|
|
#define STATE_SLASH 4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define STATE_READ 5
|
|
|
|
#define STATE_READ 5
|
|
|
|
|
|
|
|
|
|
|
|
#define STATE_END -2
|
|
|
|
#define STATE_END -2
|
|
|
|
|
|
|
|
|
|
|
|
#define STATE_ERR -1
|
|
|
|
#define STATE_ERR -1
|
|
|
|
int state = STATE_G;
|
|
|
|
int state = STATE_GET;
|
|
|
|
int ledState = 1;
|
|
|
|
int ledState = 1;
|
|
|
|
unsigned char theByte;
|
|
|
|
unsigned char theByte;
|
|
|
|
|
|
|
|
|
|
|
|
while (getSn_SR(testSocket) == SOCK_ESTABLISHED) {
|
|
|
|
while (getSn_SR(testSocket) == SOCK_ESTABLISHED) {
|
|
|
|
while (getSn_RX_RSR(testSocket) > 0) {
|
|
|
|
while (getSn_RX_RSR(testSocket) > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
if (state == STATE_G) {
|
|
|
|
if (state == STATE_GET) {
|
|
|
|
if (readMatch("GET /")) {
|
|
|
|
if (readMatch("GET /")) {
|
|
|
|
state = STATE_READ;
|
|
|
|
state = STATE_READ;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|