本文整理汇总了C++中recvFind函数的典型用法代码示例。如果您正苦于以下问题:C++ recvFind函数的具体用法?C++ recvFind怎么用?C++ recvFind使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了recvFind函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rx_empty
bool ESP8266::sATCIPSENDSingle(const uint8_t *buffer, uint32_t len)
{
rx_empty();
printAT("CIPSEND=");
m_puart->println(len);
if (recvFind(">", 5000)) {
rx_empty();
for (uint32_t i = 0; i < len; i++) {
m_puart->write(buffer[i]);
}
return recvFind("SEND OK", 10000);
}
return false;
}
开发者ID:OpenDevice,项目名称:ESP8266AT,代码行数:14,代码来源:ESP8266AT.cpp
示例2: rx_empty
bool ESP8266::sATCIPSENDSingleFromFlash(const uint8_t *buffer, uint32_t len)
{
rx_empty();
m_puart->print(F("AT+CIPSEND="));
m_puart->println(len);
if (recvFind(">", 5000)) {
rx_empty();
for (uint32_t i = 0; i < len; i++) {
m_puart->write((char) pgm_read_byte(&buffer[i]));
}
return recvFind("SEND OK", 10000);
}
return false;
}
开发者ID:lbeck37,项目名称:Arduino,代码行数:14,代码来源:ESP8266.cpp
示例3: rx_empty
bool ESP8266::sATCIPSENDSingle(String &str)
{
rx_empty();
m_puart->print("AT+CIPSEND=");
m_puart->println(str.length());
if (recvFind(">", 5000)) {
rx_empty();
for (uint32_t i = 0; i < str.length(); i++) {
m_puart->write(str.charAt(i));
}
return recvFind("SEND OK", 10000);
}
return false;
}
开发者ID:genumen,项目名称:ESP8266_Arduino_AT,代码行数:14,代码来源:ESP8266.cpp
示例4: flush
bool ESP::sATCIPSTO(uint32_t timeout)
{
flush();
this->serial->print(F("AT+CIPSTO="));
this->serial->println(timeout);
return recvFind(F("OK"), COMMAND_TIMEOUT);
}
开发者ID:vfreezy,项目名称:Power-Buddy,代码行数:7,代码来源:ESP.cpp
示例5: rx_empty
///for releaseTCP (sync)
bool ESP8266::eATCIPCLOSESingle(void)
{
//state = STATE_releaseTCP;
rx_empty();
m_puart->println("AT+CIPCLOSE");
return recvFind("OK", 5000);
}
开发者ID:rutapon,项目名称:Nw_Arduino_WeeESP8266,代码行数:9,代码来源:ESP8266.cpp
示例6: sATCIPSENDMultiple
/**
* \brief envia pacote de dados
* \param mux_id > 0 envia o AT+HTTPDATA e os dados
* \param mux_id == 0 somente dados
* \param mux_id == -1 aguarda retorno de dados
* \return 0=erro, 1=OK
*/
boolean sATCIPSENDMultiple(int mux_id, uint8_t tipo_buffer, uint8_t *buffer, boolean flag_flush)
{
int len;
if (mux_id==-1) {
return gprs.sendCommand(0);
}
//debugvar(freeMemory());
if (tipo_buffer == POINTER_CHAR_RAM)
len=strlen((char*)buffer);
else
len=strlen_P((char*)buffer);
if (!len) return true;
/// rx_empty();
//if (bitRead(ccStatus,CC_DEBUG)) debugvar(freeMemory());
#if DEBUG >= 1 || HAS_BLUETOOTH >= 1
debugvar(len);
uint8_t *b=buffer;
for (uint16_t i = 0; i < len; i++) {
if (tipo_buffer==POINTER_CHAR_PROGMEM) {
SSdebug.write(pgm_read_byte(b++));
} else {
SSdebug.write(*b++);
}
} // for
SSdebug.write('\n');
#endif
#ifdef GSM_CSTT
// esp8266Flush();
SSwifi.print("AT+CIPSEND=");
#if USE_MUX == 1
SSwifi.print(mux_id);
SSwifi.print(",");
#endif
SSwifi.print(len);
SSwifi.print("\r\n");
SSwifi.flush();
if (recvFind(">",6000)) {
PGM_PRINT("+");
//esp8266Flush();
#if 0
if (tipo_buffer==POINTER_CHAR_PROGMEM) {
#if 0
char *u;
if (len < SERIAL_TX_BUFFER_SIZE-1 && (u=(char*)malloc(SERIAL_TX_BUFFER_SIZE))) {
strcpy_P(u,(char*)buffer);
SSwifi.print(u);
SSwifi.flush();
free(u);
} else
#endif
for (uint16_t i = 0; i < len; i++) {
// SSdebug.write(pgm_read_byte(buffer));
SSwifi.write(pgm_read_byte(buffer++));
}
}else {
SSwifi.print((char*)buffer);
}
#else
for (uint16_t i = 0; i < len; i++) {
if (tipo_buffer==POINTER_CHAR_PROGMEM) {
// SSdebug.write(pgm_read_byte(buffer));
SSwifi.write(pgm_read_byte(buffer++));
}else {
// SSdebug.write(*buffer);
SSwifi.write(*buffer++);
}
}
#endif
// ret=recvFind("SEND OK", 5000);
PGM_PRINT("* ");
SSwifi.write(0x1a);
recvString(str_ret, "SEND OK", "busy","link is", 10000,flag_flush);
#if DEBUG > 0
//if (bitRead(ccStatus,CC_DEBUG))
debugln(str_ret);
#endif
if (!strncmp(str_ret,"SEND OK",7)) {
// PGM_PRINTLN("SOK");
//delay(100);
//SSwifi.flush();
//eATCIPSTATUS();
return true;
}
if (!strncmp(str_ret,"link",4)) {
sATCIPCLOSEMulitple(mux_id);
}
//.........这里部分代码省略.........
开发者ID:capolan,项目名称:TS0_firmware,代码行数:101,代码来源:GSM_tsensor.cpp
注:本文中的recvFind函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论