diff --git a/branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde b/branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde index a293858..747d97d 100644 --- a/branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde +++ b/branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde @@ -200,6 +200,23 @@ uint8_t readByte() { } +int readMatch(char *stringToMatch) { + + while (getSn_RX_RSR(testSocket) < strlen(stringToMatch)) { + // block + // TODO: Return error or wait or "too short"? + } + + for (int currCharIdx = 0; currCharIdx < strlen(stringToMatch); currCharIdx++) { + if (readByte() != stringToMatch[currCharIdx]) { + return 0; + } + } + + return 1; +} + + void loop() { Serial.println("Test W5100 socket...");