Put debug message at right place.

This commit is contained in:
Romuald Conty 2009-09-03 11:44:56 +00:00
parent d6868037c8
commit d799098753

View file

@ -86,6 +86,8 @@ serial_port rs232_open(const char* pcPortName)
* @note ARYGON-APDB (PN532): 115200,n,8,1 * @note ARYGON-APDB (PN532): 115200,n,8,1
*/ */
/** @todo provide this settings dynamically */ /** @todo provide this settings dynamically */
#define DEBUG__TRY_ARYGON_APDB
#ifdef DEBUG__TRY_ARYGON_APDB #ifdef DEBUG__TRY_ARYGON_APDB
cfsetispeed(&(sp->tiNew), B115200); cfsetispeed(&(sp->tiNew), B115200);
cfsetospeed(&(sp->tiNew), B115200); cfsetospeed(&(sp->tiNew), B115200);
@ -138,9 +140,10 @@ bool rs232_receive(const serial_port sp, byte_t* pbtRx, uint32_t* puiRxLen)
if (iResult == 0) if (iResult == 0)
{ {
// Test if we at least have received something // Test if we at least have received something
if (uiCount == 0) return false; if (uiCount == 0) {
DBG("RX time-out without received data.");
DBG("RX time-out."); return false;
}
// Store the received byte count and return succesful // Store the received byte count and return succesful
*puiRxLen = uiCount; *puiRxLen = uiCount;