earlephilhower on master
Only set flashmode byte when up… (compare)
int sendCmdAndWaitForResp(const char* cmd, const char *resp, unsigned timeout)
{
SIM.write(cmd);
// Serial.println(cmd);
int len = strlen(resp);
byte sum=0,Location=0;
unsigned long timerStart,timerEnd;
timerStart = millis();
while(1) {
if(SIM.available()) {
char c = SIM.read();
// Serial.write(c);
if(c<32) SIM_BUFF+='_';
else SIM_BUFF+=c;
Location++;
sum = (c==resp[sum]) ? sum+1 : 0;
if(sum == len) break;
}
timerEnd = millis();
if(timerEnd - timerStart > 1000 * timeout) return 0;
}
while(SIM.available()) SIM.read();
return Location-len+1;
}
question for esp8266 boffins! PROGMEM what section should it end up in... i've got 3 strings in print
Serial.printf_P( PSTR("hello-pgm"));
Serial.print("hello-not");
Serial.print( F("hello-F()"));
"hello-pgm"
and "hello-F()"
both end up in section .irom0.text:"hello-not"
ends up in section .rodata:
as
#define PROGMEM ICACHE_RODATA_ATTR
should it not all be in .rodata.. I'm not entirely sure which sections are in RAM or not...