The friendly Operating System for the Internet of Things
isrpipe.h File Reference

isrpipe Interface More...

Detailed Description

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file isrpipe.h.

#include <stdint.h>
#include "mutex.h"
#include "tsrb.h"
+ Include dependency graph for isrpipe.h:

Go to the source code of this file.

Data Structures

struct  isrpipe_t
 Context structure for isrpipe. More...
 

Macros

#define ISRPIPE_INIT(tsrb_buf)   { .mutex = MUTEX_INIT, .tsrb = TSRB_INIT(tsrb_buf) }
 Static initializer for irspipe.
 

Functions

void isrpipe_init (isrpipe_t *isrpipe, char *buf, size_t bufsize)
 Initialisation function for isrpipe. More...
 
int isrpipe_write_one (isrpipe_t *isrpipe, char c)
 Put one character into the isrpipe's buffer. More...
 
int isrpipe_read (isrpipe_t *isrpipe, char *buf, size_t count)
 Read data from isrpipe (blocking) More...
 
int isrpipe_read_timeout (isrpipe_t *isrpipe, char *buf, size_t count, uint32_t timeout)
 Read data from isrpipe (with timeout, blocking) More...
 
int isrpipe_read_all_timeout (isrpipe_t *isrpipe, char *buf, size_t count, uint32_t timeout)
 Read data from isrpipe (with timeout, blocking, wait until all read) More...