use xbee module from aversive
[protos/xbee-avr.git] / xbee_buf.h
diff --git a/xbee_buf.h b/xbee_buf.h
deleted file mode 100644 (file)
index cecddcf..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2011, Olivier MATZ <zer0@droids-corp.org>
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the University of California, Berkeley nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define XBEE_BUF_SIZE 0x200
-
-/* a xbee data buffer */
-struct xbee_buf {
-       CIRCLEQ_ENTRY(xbee_buf) next;
-       unsigned offset;
-       unsigned len;
-       char buf[XBEE_BUF_SIZE];
-};
-
-/* queue of xbee_buf */
-CIRCLEQ_HEAD(xbufq, xbee_buf);
-
-struct xbee_bufq {
-       struct xbufq xbq;
-       unsigned len;
-       unsigned nseg;
-};
-
-/* allocate a new xbee_buf */
-struct xbee_buf *xbee_buf_alloc(void);
-
-/* return the number of remaining bytes in xbee_buf */
-int xbee_buf_tailroom(struct xbee_buf *xbuf);
-
-/* return the pointer to data at offset 'off', or NULL if off > xbuf->len */
-char *xbee_buf_data(struct xbee_buf *xbuf, unsigned off);
-
-/* return the first data of a xbuf (also works if len is 0) */
-char *xbee_buf_head(struct xbee_buf *xbuf);
-
-/* return the pointer just after data of a xbuf (also works if len is 0) */
-char *xbee_buf_tail(struct xbee_buf *xbuf);
-
-/* enqueue a xbuf in a xbufq */
-void xbee_buf_enqueue(struct xbee_bufq *q, struct xbee_buf *xbuf);
-
-
-
-/* return the last xbuf of a queue, or NULL if the queue is empty */
-struct xbee_buf *xbee_bufq_last(struct xbee_bufq *q);
-
-/* initialize a xbuf queue */
-void xbee_bufq_init(struct xbee_bufq *q);
-
-/* flush a xbuf queue */
-void xbee_bufq_flush(struct xbee_bufq *q);
-
-/* append data in queue (just update lens), user should memcpy first */
-void xbee_bufq_append(struct xbee_bufq *q, unsigned len);
-
-/* return the pointer to data at offset 'off', or NULL if off > q->len */
-char *xbee_bufq_data(struct xbee_bufq *q, unsigned off);
-
-/* drop data in front of queue */
-int xbee_bufq_drop(struct xbee_bufq *q, unsigned len);
-
-/* copy data in front of queue in a linear buffer */
-int xbee_bufq_copy(struct xbee_bufq *q, void *buf, unsigned len);