27 lines
554 B
C
27 lines
554 B
C
//
|
|
// Created by rick on 02-03-21.
|
|
//
|
|
|
|
#ifndef NEW_KERNEL_STREAM_H
|
|
#define NEW_KERNEL_STREAM_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct stream stream_t;
|
|
|
|
stream_t *stream_create(uint32_t size);
|
|
|
|
void stream_free(stream_t *strm);
|
|
|
|
void stream_wait(stream_t *stream);
|
|
|
|
uint32_t stream_read(stream_t *strm, uint8_t *target, uint32_t count);
|
|
|
|
uint32_t stream_write(stream_t *strm, const uint8_t *source, uint32_t count);
|
|
|
|
uint32_t stream_get_write_available(stream_t *stream);
|
|
|
|
uint32_t stream_get_read_available(stream_t *stream);
|
|
|
|
#endif //NEW_KERNEL_STREAM_H
|