Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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...
 
int 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

◆ pipe_check_free_space()

int 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
number of bytes available or 0 if not enough

Definition at line 94 of file pipe.c.

References p, and PIPE_TX_BUFFER_SIZE.

Referenced by pipe_periph_init().

+ Here is the caller graph for this function:

◆ pipe_periph_init()

void pipe_periph_init ( struct pipe_periph p,
char *  read_name,
char *  write_name 
)

Initialize the PIPE peripheral.

Definition at line 72 of file pipe.c.

References p, pipe_arch_periph_init(), pipe_char_available(), pipe_check_free_space(), pipe_getch(), pipe_put_buffer(), pipe_put_byte(), and pipe_send_message().

+ Here is the call graph for this function:

◆ pipe_put_buffer()

void WEAK pipe_put_buffer ( struct pipe_periph p,
long  fd,
const uint8_t data,
uint16_t  len 
)

Definition at line 115 of file pipe.c.

References p, and PIPE_TX_BUFFER_SIZE.

Referenced by pipe_periph_init().

+ Here is the caller graph for this function:

◆ pipe_put_byte()

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 105 of file pipe.c.

References p, and PIPE_TX_BUFFER_SIZE.

Referenced by pipe_periph_init().

+ Here is the caller graph for this function: