source/serial_driver.cpp
uint32_t SerialPort::receiveBuffer (char *pBuf, uint32_t lenBuf)
{
	unsigned long result = 0;
    if(pgUart->readable()){
    	result = pgUart->scanf("%s",pBuf);
        if (!result){
            printf ("[serial->receiveBuffer] Receive failed !!!.\r\n");
        }
    }
    return (uint32_t) result;
}
// (4) Get up to lenBuf bytes into pBuf from the serial port, returning the number of characters actually read.
// Receive up to lenBuf characters into pBuf over the serial port.
// Returns the number of characters received.
(4) Get up to lenBuf bytes into pBuf from the serial port, returning the number of characters actually read.
Receive up to lenBuf characters into pBuf over the serial port.
Returns the number of characters received.
( 4 ) Get up to lenBuf bytes into pBuf from the serial port returning the number of characters actually read . Receive up to lenBuf characters into pBuf over the serial port . Returns the number of characters received .
uint32_t SerialPort::receiveBuffer (char *pBuf, uint32_t lenBuf)
{
	unsigned long result = 0;
    if(pgUart->readable()){
    	result = pgUart->scanf("%s",pBuf);
        if (!result){
            printf ("[serial->receiveBuffer] Receive failed !!!.\r\n");
        }
    }
    return (uint32_t) result;
}
uint32_t SerialPort :: receiveBuffer ( char * pBuf , uint32_t lenBuf ) { unsigned long result = 0 ; if ( pgUart -> readable ( ) ) { result = pgUart -> scanf ( " " , pBuf ) ; if ( ! result ) { printf ( " \r \n " ) ; } } return ( uint32_t ) result ; }
(4) Get up to lenBuf bytes into pBuf from the serial port, returning the number of characters actually read.
( 4 ) Get up to lenBuf bytes into pBuf from the serial port returning the number of characters actually read .