Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pipe.c File Reference

arch independent PIPE API More...

#include "mcu_periph/pipe.h"
#include <string.h>
+ Include dependency graph for pipe.c:

Go to the source code of this file.

Functions

void pipe_periph_init (struct pipe_periph *p, char *read_name, char *write_name)
 Initialize the PIPE peripheral. More...
 
bool WEAK pipe_check_free_space (struct pipe_periph *p, long *fd, uint16_t len)
 Check if there is enough free space in the transmit buffer. More...
 
void WEAK pipe_put_byte (struct pipe_periph *p, long fd, uint8_t data)
 Add one data byte to the tx buffer. More...
 
void WEAK pipe_put_buffer (struct pipe_periph *p, long fd, const uint8_t *data, uint16_t len)
 

Detailed Description

arch independent PIPE API

Definition in file pipe.c.

Function Documentation

bool WEAK pipe_check_free_space ( struct pipe_periph p,
long *  fd,
uint16_t  len 
)

Check if there is enough free space in the transmit buffer.

Parameters
ppointer to PIPE peripheral
lenhow many bytes of free space to check for
Returns
TRUE if enough space for len bytes

Definition at line 94 of file pipe.c.

References PIPE_TX_BUFFER_SIZE, and pipe_periph::tx_insert_idx.

Referenced by pipe_periph_init().

+ Here is the caller graph for this function:

void pipe_periph_init ( struct pipe_periph p,
char *  read_name,
char *  write_name 
)
void WEAK pipe_put_buffer ( struct pipe_periph p,
long  fd,
const uint8_t data,
uint16_t  len 
)

Definition at line 114 of file pipe.c.

References PIPE_TX_BUFFER_SIZE, pipe_periph::tx_buf, and pipe_periph::tx_insert_idx.

Referenced by pipe_periph_init().

+ Here is the caller graph for this function:

void WEAK pipe_put_byte ( struct pipe_periph p,
long  fd,
uint8_t  data 
)

Add one data byte to the tx buffer.

Parameters
ppointer to PIPE peripheral
databyte to add to tx buffer

Definition at line 104 of file pipe.c.

References PIPE_TX_BUFFER_SIZE, pipe_periph::tx_buf, and pipe_periph::tx_insert_idx.

Referenced by pipe_periph_init().

+ Here is the caller graph for this function: