Files
OpenCellular/common/in_stream.c
Anton Staaf 271bc1eae6 Stream: Add In and Out stream interfaces and config
These interfaces will be used by USART, USB and I2C
stream drivers to provide a uniform interface for
console mux'ing code.

Signed-off-by: Anton Staaf <robotboy@chromium.org>

BRANCH=None
BUG=None
TEST=make buildall -j

Change-Id: If8938512c29708f7b8c28f6ca1c707aa6b5c1708
Reviewed-on: https://chromium-review.googlesource.com/216001
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
2014-09-18 02:59:29 +00:00

20 lines
459 B
C

/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "in_stream.h"
size_t in_stream_read(struct in_stream const *stream,
uint8_t *buffer,
size_t count)
{
return stream->ops->read(stream, buffer, count);
}
void in_stream_ready(struct in_stream const *stream)
{
if (stream->ready)
stream->ready(stream);
}