utl::_1wire_i_det Namespace Reference

## Classes

struct | is_1wire_
| Primary template to catch any non 1-wire interface types. More...
struct | is_1wire_< _Tp, meta::void_t< void > >
| template to catch a proper 1-wire interface type More...

## Typedefs

template<class _Tp >
using | try_reset_t = decltype(declval< _Tp >().reset(declval< typename _Tp::Speed >()))
template<class _Tp >
using | try_rx1_t = decltype(declval< _Tp >().rx_data(declval< typename _Tp::Speed >()))
template<class _Tp >
using | try_tx1_t = decltype(declval< _Tp >().tx_data(declval< byte_t >(), declval< typename _Tp::Speed >()))
template<class _Tp >
using | try_match_t = decltype(declval< _Tp >().match(declval< _1wire_id_t & >(), declval< typename _Tp::Speed >()))
template<class _Tp >
using | try_match_n_ovdr_t = decltype(declval< _Tp >().match_n_ovdr(declval< _1wire_id_t & >()))
template<class _Tp >
using | try_skip_t = decltype(declval< _Tp >().skip(declval< typename _Tp::Speed >()))
template<class _Tp >
using | try_skip_n_ovdr_t = decltype(declval< _Tp >().skip_n_ovdr())
template<class _Tp >
using | try_first_t = decltype(declval< _Tp >().first(declval< typename _Tp::Speed >()))
template<class _Tp >
using | try_next_t = decltype(declval< _Tp >().next(declval< typename _Tp::Speed >()))

## Functions

template<typename _T >
byte_t | _touch (_T &obj, byte_t out, typename _T::Speed s)
| Write a byte to 1-Wire bus and read the response. More...
template<typename _T >
void | _match (_T &obj, _1wire_id_t &id, typename _T::Speed s)
template<typename _T >
void | _match_n_ovdr (_T &obj, _1wire_id_t &id)
template<typename _T >
void | _skip (_T &obj, typename _T::Speed s)
template<typename _T >
void | _skip_n_ovdr (_T &obj)
template<typename _T >
_1wire_id_t | _first (_T &obj, typename _T::Speed s, bool alarm)
| 'first' operation, to search on the 1-Wire for the first device. This is performed by setting dec_, pos_ and cur_ to zero and then doing the search. More...
template<typename _T >
_1wire_id_t | _next (_T &obj, typename _T::Speed s, bool alarm)
| 'next' operation, to search on the 1-Wire for the next device. This search is usually performed after a 'first' operation or another 'next' operation. Based on maxim-ic application note 187. More...

## Typedef Documentation

## try_first_t

template<class _Tp >

using utl::_1wire_i_det::try_first_t = typedef decltype (declval<_Tp>().first (declval<typename _Tp::Speed>()))

Definition at line 679 of file _1wire.h.

## try_match_n_ovdr_t

template<class _Tp >

using utl::_1wire_i_det::try_match_n_ovdr_t = typedef decltype (declval<_Tp>().match_n_ovdr (declval<_1wire_id_t&>()))

Definition at line 676 of file _1wire.h.

## try_match_t

template<class _Tp >

using utl::_1wire_i_det::try_match_t = typedef decltype (declval<_Tp>().match (declval<_1wire_id_t&>(), declval<typename _Tp::Speed>()))

Definition at line 675 of file _1wire.h.

## try_next_t

template<class _Tp >

using utl::_1wire_i_det::try_next_t = typedef decltype (declval<_Tp>().next (declval<typename _Tp::Speed>()))

Definition at line 680 of file _1wire.h.

## try_reset_t

template<class _Tp >

using utl::_1wire_i_det::try_reset_t = typedef decltype (declval<_Tp>().reset (declval<typename _Tp::Speed>()))

Definition at line 671 of file _1wire.h.

## try_rx1_t

template<class _Tp >

using utl::_1wire_i_det::try_rx1_t = typedef decltype (declval<_Tp>().rx_data (declval<typename _Tp::Speed>()))

Definition at line 672 of file _1wire.h.

## try_skip_n_ovdr_t

template<class _Tp >

using utl::_1wire_i_det::try_skip_n_ovdr_t = typedef decltype (declval<_Tp>().skip_n_ovdr ())

Definition at line 678 of file _1wire.h.

## try_skip_t

template<class _Tp >

using utl::_1wire_i_det::try_skip_t = typedef decltype (declval<_Tp>().skip (declval<typename _Tp::Speed>()))

Definition at line 677 of file _1wire.h.

## try_tx1_t

template<class _Tp >

using utl::_1wire_i_det::try_tx1_t = typedef decltype (declval<_Tp>().tx_data (declval<byte_t>(), declval<typename _Tp::Speed>()))

Definition at line 673 of file _1wire.h.

## Function Documentation

## _first()

template<typename _T >

_1wire_id_t utl::_1wire_i_det::_first | ( | _T & | obj,
|  | typename _T::Speed | s,
|  | bool | alarm
| ) |  |

'first' operation, to search on the 1-Wire for the first device. This is performed by setting dec_, pos_ and cur_ to zero and then doing the search.

Parameters

  obj | The object from which we call private members
  s | The bus speed

Returns
  ID The romID
  - nullDev Indicate no [more] device[s]

Definition at line 540 of file _1wire.h.

## _match()

template<typename _T >

void utl::_1wire_i_det::_match | ( | _T & | obj,
|  | _1wire_id_t & | id,
|  | typename _T::Speed | s
| ) |  |

Send match rom command

Parameters

  obj | The object from which we call private members
  id | The ID to select on the bus
  s | The speed to use for the command

Definition at line 493 of file _1wire.h.

## _match_n_ovdr()

template<typename _T >

void utl::_1wire_i_det::_match_n_ovdr | ( | _T & | obj,
|  | _1wire_id_t & | id
| ) |  |

Match and overdrive sequence

Parameters

  obj | The object from which we call private members
  id | The ID to select on the bus

Definition at line 505 of file _1wire.h.

## _next()

template<typename _T >

_1wire_id_t utl::_1wire_i_det::_next | ( | _T & | obj,
|  | typename _T::Speed | s,
|  | bool | alarm
| ) |  |

'next' operation, to search on the 1-Wire for the next device. This search is usually performed after a 'first' operation or another 'next' operation. Based on maxim-ic application note 187.

Parameters

  obj | The object from which we call private members
  s | The bus speed

Returns
  The romID
  - nullDev Indicate no [more] device[s]

Definition at line 556 of file _1wire.h.

## _skip()

template<typename _T >

void utl::_1wire_i_det::_skip | ( | _T & | obj,
|  | typename _T::Speed | s
| ) |  |

Send skip command to the bus

Parameters

  obj | The object from which we call private members
  id | The ID to select on the bus

Definition at line 517 of file _1wire.h.

## _skip_n_ovdr()

template<typename _T >

void utl::_1wire_i_det::_skip_n_ovdr | ( | _T & | obj | ) |

Send the Skip and Overdrive sequence

Parameters

  obj | The object from which we call private members

Definition at line 526 of file _1wire.h.

## _touch()

template<typename _T >

byte_t utl::_1wire_i_det::_touch | ( | _T & | obj,
|  | byte_t | out,
|  | typename _T::Speed | s
| ) |  |

Write a byte to 1-Wire bus and read the response.

Parameters

  obj | The object from which we call private members
  b | The byte to write
  s | Bus speed to use

Returns
  The byte received.

Definition at line 467 of file _1wire.h.