µracoli Manual Version foo

- µracoli
- User Guide
- Reference Guide

Data Structures
Utilities API

Utility functions
More...

## Data Structures
struct | buffer_t

## Detailed Description

### Overview

Utilities API in liburacoli_<board>.a

Usage

Examples

- xmpl_linbuf_rx.c
- xmpl_linbuf_tx.c

## Functions

uint8_t buffer_append_block | ( | buffer_t * | b,
|  | void * | pdata,
|  | uint8_t | size
| ) |  |

append a data block at the end of a buffer

Examples:
  xmpl_linbuf_rx.c, and xmpl_radio_stream.c.

int buffer_append_char | ( | buffer_t * | b,
|  | uint8_t | c
| ) |  |

append a char at the end of a buffer

Examples:
  xmpl_linbuf_tx.c.

uint8_t buffer_get_block | ( | buffer_t * | b,
|  | void * | pdata,
|  | uint8_t | size
| ) |  |

read a datablock from the start of a buffer

int buffer_get_char | ( | buffer_t * | b | ) |

read a char from the start of a buffer

Examples:
  xmpl_linbuf_rx.c.

buffer_t* buffer_init | ( | void * | pmem,
|  | uint8_t | size,
|  | uint8_t | start
| ) |  |

format a chunk of memory as buffer_t structure

Examples:
  xmpl_linbuf_rx.c, xmpl_linbuf_tx.c, and xmpl_radio_stream.c.

uint8_t buffer_prepend_block | ( | buffer_t * | b,
|  | void * | pdata,
|  | uint8_t | size
| ) |  |

prepend a data block at the start of a buffer

Examples:
  xmpl_linbuf_tx.c, and xmpl_radio_stream.c.

int buffer_prepend_char | ( | buffer_t * | b,
|  | int | c
| ) |  |

prepend a char at the start of a buffer

## Data Structure Documentation

struct buffer_t

buffer structure, which supports appending and prepending of data as well as chaining other buffers.

Examples:
  xmpl_linbuf_rx.c, xmpl_linbuf_tx.c, and xmpl_radio_stream.c.

Definition at line 72 of file ioutil.h.

Data Fields
uint8_t | data[] | data block
uint8_t | iend | index of the end of the data block
uint8_t | istart | index of the start of the data block
uint8_t | len | total lenght of the data block
void * | next | pointer to next buffer
uint8_t | used | tag if buffer is used or free