Project

General

Profile

Revision 1345

Added by Rich Hong over 11 years ago

Final spline code for master/slave

updated outdated libdragonfly and libwireless

View differences:

time.h
1 1
/**
2
 * Copyright (c) 2007 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
/**
2 28
 * @file time.h
3 29
 * @brief Contains time-related functions and definitions
4 30
 *
......
11 37
#ifndef _TIME_H_
12 38
#define _TIME_H_
13 39

  
14
/*Maximum # of functions*/
15
#define MAX_FUNCTIONS 10
16

  
17

  
18 40
/*	Predefined times for prescale_opt in time.c.
19 41
	To make you own, know that a pulse is 1/16th of a second. You cannot get less than this. To get more, you need
20 42
	to know how many 16ths of a second are in the time you want. (Time_desired * 16 = prescaler_opt)
......
41 63
/** @brief Delay execution for the specified time **/
42 64
void delay_ms(int ms) ;
43 65
/** @brief Enable the realtime clock **/
44
int rtc_multi_init(int* prescale_opt, void (*rtc_fun[])(void), int argc);
66
void rtc_init(int prescale_opt, void (*rtc_func)(void));
45 67
/** @brief Reset the counter of the realtime clock **/
46 68
void rtc_reset(void);
47 69
/** @brief Get the value of the realtime clock. **/
48 70
int rtc_get(void);
49 71

  
50
int rtc_add_function(void (*rtc_f) (void), int prescale_opt);
51

  
52
int rtc_remove_function(void (*rtc_func)(void));
53
int rtc_get_function_count(void);
54

  
55
int rtc_init(int prescale_opt, void (*rtc_func)(void));
56

  
57 72
/** @} **/
58 73

  
59 74
#endif

Also available in: Unified diff