ChibiOS/NIL  3.2.2
chpipes.c File Reference

Pipes code. More...

#include <string.h>
#include "ch.h"

Go to the source code of this file.


static size_t pipe_write (pipe_t *pp, const uint8_t *bp, size_t n)
 Non-blocking pipe write. More...
static size_t pipe_read (pipe_t *pp, uint8_t *bp, size_t n)
 Non-blocking pipe read. More...
void chPipeObjectInit (pipe_t *pp, uint8_t *buf, size_t n)
 Initializes a mailbox_t object. More...
void chPipeReset (pipe_t *pp)
 Resets a pipe_t object. More...
size_t chPipeWriteTimeout (pipe_t *pp, const uint8_t *bp, size_t n, sysinterval_t timeout)
 Pipe write with timeout. More...
size_t chPipeReadTimeout (pipe_t *pp, uint8_t *bp, size_t n, sysinterval_t timeout)
 Pipe read with timeout. More...

Detailed Description

Pipes code.

Byte pipes.

Operation mode

A pipe is an asynchronous communication mechanism.
Operations defined for mailboxes:

  • Write: Writes a buffer of data in the pipe in FIFO order.
  • Read: A buffer of data is read from the read and removed.
  • Reset: The pipe is emptied and all the stored data is lost.
In order to use the pipes APIs the CH_CFG_USE_PIPES option must be enabled in chconf.h.
Compatible with RT and NIL.

Definition in file chpipes.c.