uTL
micro Template library
_1wire.h File Reference

An 1-wire interface implementation. More...

#include <utl/core/impl.h>
#include <utl/core/crtp.h>
#include <utl/com/_1wire_id.h>
#include <utl/meta/meta.h>

Go to the source code of this file.

Classes

class  utl::_1wire_i< impl_t >
 Template base class for 1-wire communication interface using CRTP. More...
 
class  utl::_1wire_i< virtual_tag >
 A virtual base class implementation. More...
 
struct  utl::_1wire_i_det::is_1wire_< _Tp, typename >
 Primary template to catch any non 1-wire interface types. More...
 
struct  utl::_1wire_i_det::is_1wire_< _Tp, meta::void_t< void > >
 template to catch a proper 1-wire interface type More...
 

Namespaces

 utl
 STL's core language concepts.
 
 utl::_1wire_i_det
 

Typedefs

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

Functions

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. More...
 
template<typename _T >
void utl::_1wire_i_det::_match (_T &obj, _1wire_id_t &id, typename _T::Speed s)
 
template<typename _T >
void utl::_1wire_i_det::_match_n_ovdr (_T &obj, _1wire_id_t &id)
 
template<typename _T >
void utl::_1wire_i_det::_skip (_T &obj, typename _T::Speed s)
 
template<typename _T >
void utl::_1wire_i_det::_skip_n_ovdr (_T &obj)
 
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. More...
 
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. More...
 

Detailed Description

An 1-wire interface implementation.

Copyright (C) 2018 Christos Choutouridis

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file _1wire.h.