1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-20 21:01:25 +03:00

Fix issue with peek function

This commit is contained in:
Mimmo La Fauci
2012-06-05 14:20:22 +02:00
parent a363b196a6
commit a5c38d11a9
3 changed files with 34 additions and 9 deletions

View File

@ -146,12 +146,13 @@ uint8_t ServerDrv::availData(uint8_t sock)
return false;
}
bool ServerDrv::getData(uint8_t sock, uint8_t *data)
bool ServerDrv::getData(uint8_t sock, uint8_t *data, uint8_t peek)
{
WAIT_FOR_SLAVE_SELECT();
// Send Command
SpiDrv::sendCmd(GET_DATA_TCP_CMD, PARAM_NUMS_1);
SpiDrv::sendParam(&sock, sizeof(sock), LAST_PARAM);
SpiDrv::sendCmd(GET_DATA_TCP_CMD, PARAM_NUMS_2);
SpiDrv::sendParam(&sock, sizeof(sock));
SpiDrv::sendParam(peek, LAST_PARAM);
//Wait the reply elaboration
SpiDrv::waitForSlaveReady();