AnsweredAssumed Answered

Async Serial: GetCharsInRxBuf never > 0

Question asked by Pete Klammer on Mar 25, 2013
Latest reply on Apr 18, 2013 by Petr_H

What is wrong with the following picture??? It spits out "Hello World" but never receives any of my typing to echo!

 

int main(void)

/*lint -restore Enable MISRA rule (6.3) checking. */

{

    static unsigned char bUARTdebugInputCount = 0 ;

    LDD_TDeviceData * pUARTdebugDeviceDataStructure ;

    char strHelloWorld[] = "Hello, World!\r\nLEDsAsynchroSerial here!\r\n" ;

    byte bReceivedByte ;

    unsigned uCharsInRxBuf ;

    /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

    PE_low_level_init();

    /*** End of Processor Expert internal initialization.                    ***/

    /* Write your code here */

    pUARTdebugDeviceDataStructure = ASerialLdd1_Init( NULL );

    ASerialLdd1_SendBlock( pUARTdebugDeviceDataStructure, strHelloWorld, sizeof( strHelloWorld ) ) ;

    for(;;) {

        while( ( uCharsInRxBuf = UARTdebug_GetCharsInRxBuf() ) > 0 ) {

            ++bUARTdebugInputCount ;

            UARTdebug_RecvChar( &bReceivedByte ) ;

            UARTdebug_SendChar( bReceivedByte ) ;

        }

    }

Outcomes