A code sample showing the use of the asynchronous Serial APIs.

Dependencies:   mbed

Issue: Wrong write length on reception of 'S' (Closed: Fixed)

On the following program, shouldn't line 66, which is currently as in Current be as in Updated?:

Import programSerial-LowPower-Demo

A code sample showing the use of the asynchronous Serial APIs.

Current

for(unsigned char i; i < BUFF_LENGTH; i++) {

Updated

for(; i < BUFF_LENGTH; i++) {

Otherwise the length obtained inside is lost:

Complete Snippet

        for(unsigned char i; i < BUFF_LENGTH; i++) {
            //Found the length!
            if(rx_buf[i] == 'S') break;
        }

1 comment:

24 Jun 2015

Thank you for reporting this, fixed now.