-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptoTC.h
More file actions
56 lines (46 loc) · 1.7 KB
/
Copy pathOptoTC.h
File metadata and controls
56 lines (46 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* OptoTC.h
*
* Created: 11/13/2013 9:30:37 PM
* Author: Caroline
*/
#ifndef OPTOTC_H_
#define OPTOTC_H_
#include <stdint.h>
#include "intc.h"
#include "interrupt/interrupt_avr32.h"
#include "avr32\uc3l064.h"
#include "avr32\tc_2231.h"
/************************************************************************/
/* Initialize the Timer/Counter
/*
/* Parameters:
/* volatile avr32_tc_channel_t *tc - base address of TC module
/* unsigned int channel - TC channel
/************************************************************************/
void initTC(unsigned int channel, volatile avr32_tc_channel_t *tc);
/************************************************************************/
/* Initialize interrupts for TC
/*
/* Parameters:
/* volatile avr32_tc_channel_t *tc - base address of TC module
/* unsigned int channel - TC channel
/************************************************************************/
void initTC_interrupts(unsigned int channel, volatile avr32_tc_channel_t *tc);
/************************************************************************/
/* Set the RC value for TC
/*
/* Parameters:
/* volatile avr32_tc_channel_t *tc - base address of TC module
/* unsigned int channel - TC channel
/************************************************************************/
void set_TC_RC(unsigned int channel, volatile avr32_tc_channel_t *tc);
/************************************************************************/
/* Start the TC
/*
/* Parameters:
/* volatile avr32_tc_channel_t *tc - base address of TC module
/* unsigned int channel - TC channel
/************************************************************************/
void start_TC(unsigned int channel, volatile avr32_tc_channel_t *tc);
#endif /* OPTOTC_H_ */