#include <OWI.h>
template<BOARD::pin_t PIN>
class Slave::OWI< PIN >
Definition at line 33 of file OWI.h.
template<BOARD::pin_t PIN>
Standard 1-Wire ROM Commands.
Enumerator |
---|
SEARCH_ROM |
Initiate device search.
|
READ_ROM |
Read device family code and serial number.
|
MATCH_ROM |
Select device with 64-bit rom code.
|
SKIP_ROM |
Broadcast or single device.
|
ALARM_SEARCH |
Initiate device alarm search.
|
LABEL_ROM |
Set short address (8-bit).
|
READ_LABEL |
Get 8-bit short address.
|
MATCH_LABEL |
Select device with 8-bit short address.
|
Definition at line 287 of file OWI.h.
template<BOARD::pin_t PIN>
Construct one wire bus slave device connected to the given template pin parameter, and rom identity code. Cyclic redundancy check sum is generated for given rom identity code.
- Parameters
-
[in] | rom | identity code (program memory). |
Definition at line 47 of file OWI.h.
template<BOARD::pin_t PIN>
Construct one wire bus slave device connected to the given template pin parameter, and family code. Random identity code is generated.
- Parameters
-
Definition at line 68 of file OWI.h.
template<BOARD::pin_t PIN>
Get alarm setting.
- Returns
- alarm setting.
Definition at line 108 of file OWI.h.
template<BOARD::pin_t PIN>
Set alarm to given value.
- Parameters
-
Definition at line 117 of file OWI.h.
template<BOARD::pin_t PIN>
Get cyclic redundancy check sum. Calculated by buffer read() and write().
- Returns
- crc.
Definition at line 90 of file OWI.h.
template<BOARD::pin_t PIN>
Set cyclic redundancy check sum.
- Parameters
-
Definition at line 99 of file OWI.h.
template<BOARD::pin_t PIN>
static uint8_t Slave::OWI< PIN >::crc_update |
( |
uint8_t |
crc, |
|
|
uint8_t |
data |
|
) |
| |
|
inlinestatic |
template<BOARD::pin_t PIN>
uint8_t Slave::OWI< PIN >::read |
( |
uint8_t |
bits = 8 | ) |
|
|
inline |
Read bits from one wire bus master. Default number of bits is 8. Calculate intermediate cyclic redundancy check sum.
- Parameters
-
- Returns
- value read.
Definition at line 162 of file OWI.h.
template<BOARD::pin_t PIN>
bool Slave::OWI< PIN >::read |
( |
void * |
buf, |
|
|
size_t |
count |
|
) |
| |
|
inline |
Read given number of bytes from one wire bus master to given buffer. Calculate intermediate cyclic redundancy check sum, and return validation (should be zero).
- Parameters
-
[in] | buf | buffer pointer. |
[in] | count | number of bytes to read. |
- Returns
- true(1) if check sum is correct otherwise false(0).
Definition at line 202 of file OWI.h.
template<BOARD::pin_t PIN>
Read command and filter label sub-commands. Returns command or zero(0).
- Returns
- command.
Definition at line 355 of file OWI.h.
template<BOARD::pin_t PIN>
Check for reset signal. Return true(1) if reset was detected and presence was signaled, otherwise false(0).
- Returns
- true(1) on reset and presence, otherwise false(0).
Definition at line 127 of file OWI.h.
template<BOARD::pin_t PIN>
Check for reset and standard rom commands. Returns true(1) if the device was selected and extended command will follow, otherwise false(0).
- Returns
- true(1) on extended command will follow, otherwise false(0).
Definition at line 304 of file OWI.h.
template<BOARD::pin_t PIN>
Write bit and inverse bit. Return read bit.
- Parameters
-
- Returns
- bit read.
Definition at line 277 of file OWI.h.
template<BOARD::pin_t PIN>
void Slave::OWI< PIN >::write |
( |
uint8_t |
value, |
|
|
uint8_t |
bits = 8 |
|
) |
| |
|
inline |
Write bits to one wire bus master. The bits are written from LSB to MSB. Default number of bits is 8. Calculate intermediate cyclic redundancy check sum.
- Parameters
-
[in] | value | to write. |
[in] | bits | to be written. |
Definition at line 223 of file OWI.h.
template<BOARD::pin_t PIN>
void Slave::OWI< PIN >::write |
( |
const void * |
buf, |
|
|
size_t |
count |
|
) |
| |
|
inline |
Write bytes to one wire bus master. Calculates and writes 1-wire cyclic redundancy checksum last.
- Parameters
-
[in] | buf | buffer to write. |
[in] | count | number of bytes to write. |
Definition at line 258 of file OWI.h.
template<BOARD::pin_t PIN>
Alarm setting.
Definition at line 405 of file OWI.h.
template<BOARD::pin_t PIN>
Intermediate cyclic redundancy check sum.
Definition at line 408 of file OWI.h.
template<BOARD::pin_t PIN>
ROM label (short address).
Definition at line 402 of file OWI.h.
template<BOARD::pin_t PIN>
1-Wire bus pin.
Definition at line 393 of file OWI.h.
template<BOARD::pin_t PIN>
ROM identity code.
Definition at line 399 of file OWI.h.
template<BOARD::pin_t PIN>
Reset detect timestamp.
Definition at line 396 of file OWI.h.
template<BOARD::pin_t PIN>
One Wire device identity ROM size in bytes.
Definition at line 36 of file OWI.h.
template<BOARD::pin_t PIN>
One Wire device identity ROM size in bits.
Definition at line 39 of file OWI.h.
The documentation for this class was generated from the following file: