zero_stream.h 781 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2018 Actions Semiconductor Co., Ltd
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file zero stream interface
  8. */
  9. #ifndef __ZERO_STREAM_H__
  10. #define __ZERO_STREAM_H__
  11. #include <stream.h>
  12. /**
  13. * @defgroup zero_stream_apis Buffer Stream APIs
  14. * @ingroup stream_apis
  15. * @{
  16. */
  17. /**
  18. * @brief create zero stream , return stream handle
  19. *
  20. * This routine provides create stream ,and return stream handle.
  21. * and stream state is STATE_INIT.
  22. *
  23. * This stream always return zero data for stream_read, and always ignore
  24. * data for stream_write.
  25. *
  26. * @return stream handle if create stream success
  27. * @return NULL if create stream failed
  28. */
  29. io_stream_t zero_stream_create(void);
  30. /**
  31. * @} end defgroup zero_stream_apis
  32. */
  33. #endif /* __ZERO_STREAM_H__ */