45#define ISRPIPE_INIT(tsrb_buf) { .mutex = MUTEX_INIT, \
46 .tsrb = TSRB_INIT(tsrb_buf) }
int isrpipe_write_one(isrpipe_t *isrpipe, uint8_t c)
Put one byte into the isrpipe's buffer.
void isrpipe_init(isrpipe_t *isrpipe, uint8_t *buf, size_t bufsize)
Initialisation function for isrpipe.
int isrpipe_read(isrpipe_t *isrpipe, uint8_t *buf, size_t count)
Read data from isrpipe (blocking)
int isrpipe_write(isrpipe_t *isrpipe, const uint8_t *buf, size_t n)
Put number of bytes into the isrpipe's buffer.
Mutex for thread synchronization.
Context structure for isrpipe.
tsrb_t tsrb
isrpipe thread safe ringbuffer
mutex_t mutex
isrpipe mutex
thread-safe ringbuffer struct
Thread-safe ringbuffer interface definition.