Hiroshi Yamaguchi / XBee 1.0
Committer:
yamaguch
Date:
Tue Nov 01 09:04:12 2011 +0000
Revision:
0:ea8459db49ef
0.9

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yamaguch 0:ea8459db49ef 1 /*
yamaguch 0:ea8459db49ef 2 Copyright (c) 2011, Senio Networks, Inc.
yamaguch 0:ea8459db49ef 3
yamaguch 0:ea8459db49ef 4 Permission is hereby granted, free of charge, to any person obtaining a copy
yamaguch 0:ea8459db49ef 5 of this software and associated documentation files (the "Software"), to deal
yamaguch 0:ea8459db49ef 6 in the Software without restriction, including without limitation the rights
yamaguch 0:ea8459db49ef 7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
yamaguch 0:ea8459db49ef 8 copies of the Software, and to permit persons to whom the Software is
yamaguch 0:ea8459db49ef 9 furnished to do so, subject to the following conditions:
yamaguch 0:ea8459db49ef 10
yamaguch 0:ea8459db49ef 11 The above copyright notice and this permission notice shall be included in
yamaguch 0:ea8459db49ef 12 all copies or substantial portions of the Software.
yamaguch 0:ea8459db49ef 13
yamaguch 0:ea8459db49ef 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
yamaguch 0:ea8459db49ef 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
yamaguch 0:ea8459db49ef 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
yamaguch 0:ea8459db49ef 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
yamaguch 0:ea8459db49ef 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
yamaguch 0:ea8459db49ef 19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
yamaguch 0:ea8459db49ef 20 THE SOFTWARE.
yamaguch 0:ea8459db49ef 21 */
yamaguch 0:ea8459db49ef 22
yamaguch 0:ea8459db49ef 23 #define min(x, y) ((x) < (y) ? (x) : (y))
yamaguch 0:ea8459db49ef 24 #define BYTE(a, n) ((char *) &(a))[n]
yamaguch 0:ea8459db49ef 25 #define INDEX(n) ((n) % BUFSIZE)
yamaguch 0:ea8459db49ef 26 #define SIZE(b, i) (b[i] << 8 | b[INDEX(i + 1)])