Project

General

Profile

Revision 873

commented!

View differences:

branches/autonomous_recharging/code/projects/libbayboard/homing.c
22 22
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 23
 * OTHER DEALINGS IN THE SOFTWARE.
24 24
 **/
25
 /**
26
 * Copyright (c) 2008 Colony Project
27
 * 
28
 * Permission is hereby granted, free of charge, to any person
29
 * obtaining a copy of this software and associated documentation
30
 * files (the "Software"), to deal in the Software without
31
 * restriction, including without limitation the rights to use,
32
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
33
 * copies of the Software, and to permit persons to whom the
34
 * Software is furnished to do so, subject to the following
35
 * conditions:
36
 * 
37
 * The above copyright notice and this permission notice shall be
38
 * included in all copies or substantial portions of the Software.
39
 * 
40
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47
 * OTHER DEALINGS IN THE SOFTWARE.
48
 **/
25 49
 
26 50
 /**
27 51
 * @file homing.c
......
44 68
volatile int state = 0;
45 69
volatile int on = 0;
46 70

  
71
/**
72
 * @defgroup homing Homing
73
 * @brief Functions for controlling the homing beacons.
74
 * 
75
 * Functions for controlling the homing beacons.
76
 *
77
 * @{
78
 **/
79

  
80
/** @brief Sets up the beacons to be used. **/
81
 
47 82
void IR_init(void){
48 83
  
49
  usb_puts("hi\n");
50 84
  DDRA |= _BV(DDA0)|_BV(DDA1);
51 85
  DDRB |= _BV(DDB3);
52 86
  DDRC |= _BV(DDC0)|_BV(DDC1);
......
66 100
  
67 101
}
68 102

  
103
/** @brief Turns the beacons on. **/
104

  
69 105
void IR_on(void){
70 106
	on = 1;
71 107
}
72 108

  
109
/** @brief Turns the beacons off. **/
110

  
73 111
void IR_off(void){
74 112
	on = 0;
75 113
}
......
93 131
  }
94 132
   
95 133
}
134

  
135
/** @} **/ //end group
branches/autonomous_recharging/code/projects/libbayboard/homing.h
31 31
 *
32 32
 * @author Colony Project, CMU Robotics Club
33 33
 **/
34
 
34

  
35
#ifndef _HOMING_H
36
#define _HOMING_H
37

  
38
/**
39
 * @addtogroup homing
40
 * @{
41
 **/
42

  
43
/** @brief Sets up the beacons to be used. **/
35 44
void IR_init(void);
45
/** @brief Turns the beacons on. **/
36 46
void IR_on(void);
47
/** @brief Turns the beacons off. **/
37 48
void IR_off(void);
49

  
50
/** @} **/
51

  
52
#endif

Also available in: Unified diff