Arduino-GPIO
General Purpose Input/Output (GPIO) library for Arduino
iovec.h File Reference

Go to the source code of this file.

Classes

struct  iovec_t
 

Functions

size_t iovec_size (const iovec_t *vec)
 
void iovec_arg (iovec_t *&vp, const void *buf, size_t size)
 
void iovec_end (iovec_t *&vp)
 

Detailed Description

Version
1.0

License

Copyright (C) 2017, Mikael Patel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Definition in file iovec.h.

Function Documentation

void iovec_arg ( iovec_t *&  vp,
const void *  buf,
size_t  size 
)
inline

Set next io-vector buffer. Used in to form:

1 iovec_t vec[N];
2 iovec_t* vp = vec;
3 iovec_arg(vp, buf, size);
4 ..
5 iovec_end(vp);
Parameters
[in,out]vpio vector pointer
[in]bufbuffer.
[in]sizenumber of bytes.

Definition at line 59 of file iovec.h.

void iovec_end ( iovec_t *&  vp)
inline

Mark end of io-vector buffer at given index. Used in the form:

1 iovec_t vec[N];
2 iovec_t* vp = vec;
3 iovec_arg(vp, buf, size);
4 ..
5 iovec_end(vp);
Parameters
[in,out]vpio vector.

Definition at line 78 of file iovec.h.

size_t iovec_size ( const iovec_t vec)
inline

Return total size of null terminated io buffer vector.

Parameters
[in]vecio vector pointer
Returns
size.

Definition at line 36 of file iovec.h.