git.ucc.asn.au
/
matches
/
honours.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ARGH
[matches/honours.git]
/
research
/
TCS
/
apparatus
/
source_code
/
dac.h
1
#ifndef _DAC_H
\r
2
#define _DAC_H
\r
3
\r
4
/**
\r
5
* @file dac.h
\r
6
* @author Sam Moore
\r
7
* @purpose driver for DAC (ef-mini mcp4922)
\r
8
*/
\r
9
\r
10
#include <stdint.h>
\r
11
#include <avr/io.h>
\r
12
#include <avr/interrupt.h>
\r
13
#include "main.h"
\r
14
\r
15
\r
16
#define DAC_PORT PORTB
\r
17
#define DAC_DDR DDRB
\r
18
\r
19
#define SDI 0
\r
20
#define CS 1
\r
21
#define LDAC 2
\r
22
#ifndef SCK
\r
23
#define SCK 3
\r
24
#endif
\r
25
#define SHDN 4
\r
26
\r
27
extern void DAC_Init(void);
\r
28
extern void DAC_Set(int output);
\r
29
\r
30
#endif //DAC_H
\r
31
\r
32
//EOF
\r
UCC
git Repository :: git.ucc.asn.au