blob: cb0b57761e299c23083b90352f155e62adb4076c (
plain)
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
|
/*
* Copyright 2021 Daniel Friesel
*
* SPDX-License-Identifier: BSD-2-Clause
*
* DS2482-100 Single-Channel 1-Wire Master
*/
#pragma once
class DS2482 {
private:
DS2482(const DS2482 ©);
unsigned char const address;
unsigned char txbuf[2];
unsigned char rxbuf[1];
public:
DS2482(unsigned char const addr) : address(addr) {}
void setup();
void busReset();
unsigned char status();
void readROM(unsigned char *data, unsigned char len);
};
extern DS2482 ds2482;
|