Subversion Repositories group.electronics

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
130 pfowler 1
/*
2
 * hc595.h
3
 *
4
 *  Created on: 16/07/2014
5
 *      Author: pfowler
6
 */
7
 
8
#ifndef HC595_H_
9
#define HC595_H_
10
 
11
void hc595_init(void);
12
void hc595_pulse(void);
13
void hc595_latch(void);
14
 
15
void hc595_write(uint8_t data);
16
 
17
/*
18
 * Check that all our defines have been made
19
 * These would usually go in config.h
20
 */
21
 
22
#ifndef HC595_PORT
23
#error "HC959 lib: Must define HC595_PORT"
24
#endif
25
 
26
#ifndef HC595_DDR
27
#error "HC959 lib: Must define HC595_DDR"
28
#endif
29
 
30
#ifndef HC595_DS_PIN
31
#error "HC959 lib: Must define HC595_DS_PIN"
32
#endif
33
 
34
#ifndef HC595_SHCP_PIN
35
#error "HC959 lib: Must define HC595_SHCP_PIN"
36
#endif
37
 
38
#ifndef HC595_STCP_PIN
39
#error "HC959 lib: Must define HC595_STCP_PIN"
40
#endif
41
 
42
 
43
#endif /* HC595_H_ */