Generic communication interface between the wireless board (mote) and the sensor board. Any kind of sensor board can be connected to the mote using this specification given it provides a SPI peripheral, one input pin with interrupt capability and one digital output. The sensor board must implement a special register set from which all required information can be retrieved. Protocol: http://is.gd/wuQorh Github: http://is.gd/ySj1L9
pt/lc-addrlabels.h@1:acdf490d94a7, 2014-04-08 (annotated)
- Committer:
- marcelobarrosalmeida
- Date:
- Tue Apr 08 16:34:20 2014 +0000
- Revision:
- 1:acdf490d94a7
Adding accel to sensor list
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
marcelobarrosalmeida | 1:acdf490d94a7 | 1 | /* |
marcelobarrosalmeida | 1:acdf490d94a7 | 2 | * Copyright (c) 2004-2005, Swedish Institute of Computer Science. |
marcelobarrosalmeida | 1:acdf490d94a7 | 3 | * All rights reserved. |
marcelobarrosalmeida | 1:acdf490d94a7 | 4 | * |
marcelobarrosalmeida | 1:acdf490d94a7 | 5 | * Redistribution and use in source and binary forms, with or without |
marcelobarrosalmeida | 1:acdf490d94a7 | 6 | * modification, are permitted provided that the following conditions |
marcelobarrosalmeida | 1:acdf490d94a7 | 7 | * are met: |
marcelobarrosalmeida | 1:acdf490d94a7 | 8 | * 1. Redistributions of source code must retain the above copyright |
marcelobarrosalmeida | 1:acdf490d94a7 | 9 | * notice, this list of conditions and the following disclaimer. |
marcelobarrosalmeida | 1:acdf490d94a7 | 10 | * 2. Redistributions in binary form must reproduce the above copyright |
marcelobarrosalmeida | 1:acdf490d94a7 | 11 | * notice, this list of conditions and the following disclaimer in the |
marcelobarrosalmeida | 1:acdf490d94a7 | 12 | * documentation and/or other materials provided with the distribution. |
marcelobarrosalmeida | 1:acdf490d94a7 | 13 | * 3. Neither the name of the Institute nor the names of its contributors |
marcelobarrosalmeida | 1:acdf490d94a7 | 14 | * may be used to endorse or promote products derived from this software |
marcelobarrosalmeida | 1:acdf490d94a7 | 15 | * without specific prior written permission. |
marcelobarrosalmeida | 1:acdf490d94a7 | 16 | * |
marcelobarrosalmeida | 1:acdf490d94a7 | 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND |
marcelobarrosalmeida | 1:acdf490d94a7 | 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
marcelobarrosalmeida | 1:acdf490d94a7 | 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
marcelobarrosalmeida | 1:acdf490d94a7 | 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE |
marcelobarrosalmeida | 1:acdf490d94a7 | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
marcelobarrosalmeida | 1:acdf490d94a7 | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
marcelobarrosalmeida | 1:acdf490d94a7 | 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
marcelobarrosalmeida | 1:acdf490d94a7 | 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
marcelobarrosalmeida | 1:acdf490d94a7 | 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
marcelobarrosalmeida | 1:acdf490d94a7 | 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
marcelobarrosalmeida | 1:acdf490d94a7 | 27 | * SUCH DAMAGE. |
marcelobarrosalmeida | 1:acdf490d94a7 | 28 | * |
marcelobarrosalmeida | 1:acdf490d94a7 | 29 | * This file is part of the Contiki operating system. |
marcelobarrosalmeida | 1:acdf490d94a7 | 30 | * |
marcelobarrosalmeida | 1:acdf490d94a7 | 31 | * Author: Adam Dunkels <adam@sics.se> |
marcelobarrosalmeida | 1:acdf490d94a7 | 32 | * |
marcelobarrosalmeida | 1:acdf490d94a7 | 33 | * $Id: lc-addrlabels.h,v 1.4 2006/06/03 11:29:43 adam Exp $ |
marcelobarrosalmeida | 1:acdf490d94a7 | 34 | */ |
marcelobarrosalmeida | 1:acdf490d94a7 | 35 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 36 | /** |
marcelobarrosalmeida | 1:acdf490d94a7 | 37 | * \addtogroup lc |
marcelobarrosalmeida | 1:acdf490d94a7 | 38 | * @{ |
marcelobarrosalmeida | 1:acdf490d94a7 | 39 | */ |
marcelobarrosalmeida | 1:acdf490d94a7 | 40 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 41 | /** |
marcelobarrosalmeida | 1:acdf490d94a7 | 42 | * \file |
marcelobarrosalmeida | 1:acdf490d94a7 | 43 | * Implementation of local continuations based on the "Labels as |
marcelobarrosalmeida | 1:acdf490d94a7 | 44 | * values" feature of gcc |
marcelobarrosalmeida | 1:acdf490d94a7 | 45 | * \author |
marcelobarrosalmeida | 1:acdf490d94a7 | 46 | * Adam Dunkels <adam@sics.se> |
marcelobarrosalmeida | 1:acdf490d94a7 | 47 | * |
marcelobarrosalmeida | 1:acdf490d94a7 | 48 | * This implementation of local continuations is based on a special |
marcelobarrosalmeida | 1:acdf490d94a7 | 49 | * feature of the GCC C compiler called "labels as values". This |
marcelobarrosalmeida | 1:acdf490d94a7 | 50 | * feature allows assigning pointers with the address of the code |
marcelobarrosalmeida | 1:acdf490d94a7 | 51 | * corresponding to a particular C label. |
marcelobarrosalmeida | 1:acdf490d94a7 | 52 | * |
marcelobarrosalmeida | 1:acdf490d94a7 | 53 | * For more information, see the GCC documentation: |
marcelobarrosalmeida | 1:acdf490d94a7 | 54 | * http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html |
marcelobarrosalmeida | 1:acdf490d94a7 | 55 | * |
marcelobarrosalmeida | 1:acdf490d94a7 | 56 | */ |
marcelobarrosalmeida | 1:acdf490d94a7 | 57 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 58 | #ifndef __LC_ADDRLABELS_H__ |
marcelobarrosalmeida | 1:acdf490d94a7 | 59 | #define __LC_ADDRLABELS_H__ |
marcelobarrosalmeida | 1:acdf490d94a7 | 60 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 61 | /** \hideinitializer */ |
marcelobarrosalmeida | 1:acdf490d94a7 | 62 | typedef void * lc_t; |
marcelobarrosalmeida | 1:acdf490d94a7 | 63 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 64 | #define LC_INIT(s) s = NULL |
marcelobarrosalmeida | 1:acdf490d94a7 | 65 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 66 | #define LC_RESUME(s) \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 67 | do { \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 68 | if(s != NULL) { \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 69 | goto *s; \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 70 | } \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 71 | } while(0) |
marcelobarrosalmeida | 1:acdf490d94a7 | 72 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 73 | #define LC_CONCAT2(s1, s2) s1##s2 |
marcelobarrosalmeida | 1:acdf490d94a7 | 74 | #define LC_CONCAT(s1, s2) LC_CONCAT2(s1, s2) |
marcelobarrosalmeida | 1:acdf490d94a7 | 75 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 76 | #define LC_SET(s) \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 77 | do { \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 78 | LC_CONCAT(LC_LABEL, __LINE__): \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 79 | (s) = &&LC_CONCAT(LC_LABEL, __LINE__); \ |
marcelobarrosalmeida | 1:acdf490d94a7 | 80 | } while(0) |
marcelobarrosalmeida | 1:acdf490d94a7 | 81 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 82 | #define LC_END(s) |
marcelobarrosalmeida | 1:acdf490d94a7 | 83 | |
marcelobarrosalmeida | 1:acdf490d94a7 | 84 | #endif /* __LC_ADDRLABELS_H__ */ |
marcelobarrosalmeida | 1:acdf490d94a7 | 85 | /** @} */ |