Initial import of onewire-to-usb bridge
[onewire] / onewire.h
CommitLineData
bba33fe1
JM
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
11bool OW_reset(void);
12void OW_write_bit(bool val);
13bool OW_read_bit();
14void OW_write_byte(unsigned char byte);
15unsigned char OW_read_byte(void);
16
17void OW_search_init();
18bool OW_search(void);
19void OW_start(void);
20
21void OW_identify();
22bool OW_parasite(void);
23void OW_read_block(uint8_t code, uint8_t * data, uint8_t len);
24void OW_convert();
25
26/* these were private, but needed for debug */
27inline void drive_OW_low(void);
28inline void drive_OW_high(void);
29inline void float_OW(void);
30inline bool read_OW(void);
31
32extern unsigned char romid[8];
33
34#endif /* ONEWIRE_H */
35