Project

General

Profile

Statistics
| Revision:

root / branches / wireless / code / projects / libwireless / wireless.c @ 1587

History | View | Annotate | Download (2.26 KB)

1 1576 dsschult
/**
2
 * Copyright (c) 2009 Colony Project
3
 *
4
 * Permission is hereby granted, free of charge, to any person
5
 * obtaining a copy of this software and associated documentation
6
 * files (the "Software"), to deal in the Software without
7
 * restriction, including without limitation the rights to use,
8
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
9
 * copies of the Software, and to permit persons to whom the
10
 * Software is furnished to do so, subject to the following
11
 * conditions:
12
 *
13
 * The above copyright notice and this permission notice shall be
14
 * included in all copies or substantial portions of the Software.
15
 *
16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
 * OTHER DEALINGS IN THE SOFTWARE.
24
 **/
25
26
/**
27
 * @file wireless.c
28
 * @brief Wireless library
29
 *
30
 * Implementation of high level wireless communication.
31
 *
32
 * @author Colony Project, CMU Robotics Club
33
 **/
34
35
#include "wl_defs.h"
36
#include "wireless.h"
37
38
39
// this is the common wireless file
40
41 1577 dsschult
/**
42
 * @addtogroup wireless Wireless
43
 * @{
44
 **/
45
46
/**
47
 * initialization function:
48
 * set up xbee communication and packet handler infrastructure
49
 *
50 1581 dsschult
 * @return 0 on success, or error code
51 1577 dsschult
 **/
52 1576 dsschult
int8_t wl_init(void) {
53
54
  return 0;
55
}
56
57 1577 dsschult
/**
58
 * termination function:
59
 * end xbee communication, deregister all handlers, etc
60
 *
61 1581 dsschult
 * @return 0 on success, or error code
62 1577 dsschult
 **/
63
int8_t wl_terminate(void) {
64
65
  return 0;
66
}
67
68
/**
69
 * function to register new packet handlers (for non-default groups only)
70
 *
71
 * @param group the packet group number of the packets to handle with this function
72
 * @param func the function pointer to the user-specified packet handler
73 1581 dsschult
 * @param priority flag to set the priority of the function handler
74 1577 dsschult
 *
75 1581 dsschult
 * @return 0 on success, or error code
76 1577 dsschult
 **/
77 1576 dsschult
int8_t wl_register_handler(uint8_t group, void (*func)(void), uint8_t priority) {
78
79 1581 dsschult
  return WL_SUCCESS;
80 1576 dsschult
}
81
82
83 1577 dsschult
/**@} **/ //end defgroup
84
85
86
// Define all private functions down here
87
88