psram_stream.h 768 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2018 Actions Semiconductor Co., Ltd
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file psram stream interface
  8. */
  9. #ifndef __PSRAM_STREAM_H__
  10. #define __PSRAM_STREAM_H__
  11. #include <stream.h>
  12. #ifdef CONFIG_PSRAM
  13. #include <psram.h>
  14. #endif
  15. /**
  16. * @defgroup psram_stream_apis Psram Stream APIs
  17. * @ingroup stream_apis
  18. * @{
  19. */
  20. /** structure of psram stream info,
  21. * used to pass parama to psram stream
  22. */
  23. struct psram_info_t {
  24. /** size of cache*/
  25. int size;
  26. /** name of cache*/
  27. char *name;
  28. /** wait size of cache*/
  29. int min_size;
  30. /** write must wait free space*/
  31. bool write_pending;
  32. };
  33. io_stream_t psram_stream_create(struct psram_info_t *psram_info);
  34. /**
  35. * @} end defgroup psram_stream_apis
  36. */
  37. #endif /* __PSRAM_STREAM_H__ */