src/slcan.c
/**
 * Reads out the tx buffer.
 * 
 * @param buf    The buffer to write to
 * @param length The length of the given buffer
 * 
 * @return The number of bytes written to the buffer
 */
Reads out the tx buffer.

@param buf    The buffer to write to
@param length The length of the given buffer

@return The number of bytes written to the buffer
Reads out the tx buffer . @param buf The buffer to write to @param length The length of the given buffer @return The number of bytes written to the buffer
uint16_t slcan_read_tx_buf(uint8_t *buf, uint16_t length)
{
    uint16_t index = 0;
    if (buf != NULL) {
        while (!circbuf_isEmpty(&slcan_txbuf) && (index < length)) {
            buf[index] = circbuf_pop(&slcan_txbuf);
            index++;
        }
    }
    return index;
}
uint16_t slcan_read_tx_buf ( uint8_t * buf , uint16_t length ) { uint16_t index = 0 ; if ( buf != NULL ) { while ( ! circbuf_isEmpty ( & slcan_txbuf ) && ( index < length ) ) { buf [ index ] = circbuf_pop ( & slcan_txbuf ) ; index ++ ; } } return index ; }
Reads out the tx buffer.
Reads out the tx buffer .