Initial import of onewire-to-usb bridge
[onewire] / onewire.h
1 /* 
2  * File:   onewire.h
3  * Author: justin
4  *
5  * Created on 31 May 2013, 14:45
6  */
7
8 #ifndef ONEWIRE_H
9 #define ONEWIRE_H
10
11 bool OW_reset(void);
12 void OW_write_bit(bool val);
13 bool OW_read_bit();
14 void OW_write_byte(unsigned char byte);
15 unsigned char OW_read_byte(void);
16
17 void OW_search_init();
18 bool OW_search(void);
19 void OW_start(void);
20
21 void OW_identify();
22 bool OW_parasite(void);
23 void OW_read_block(uint8_t code, uint8_t * data, uint8_t len);
24 void OW_convert();
25
26 /* these were private, but needed for debug */
27 inline void drive_OW_low(void);
28 inline void drive_OW_high(void);
29 inline void float_OW(void);
30 inline bool read_OW(void);
31
32 extern unsigned char romid[8];
33
34 #endif  /* ONEWIRE_H */
35