uTL
micro Template library
spi.h File Reference

An Abstract base class interface for the spi bus. More...

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

Go to the source code of this file.

Classes

class  utl::spi_i< impl_t >
 
class  utl::spi_i< virtual_tag >
 A virtual base class implementation. More...
 
struct  utl::spi_i_details::is_spi_< _Tp, typename >
 Primary template to catch any non SPI interface types. More...
 
struct  utl::spi_i_details::is_spi_< _Tp, meta::void_t< meta::use_if_same_t< try_cclock_t< _Tp >, uint32_t >, meta::use_if_same_t< try_clock_t< _Tp >, void >, meta::use_if_same_t< try_tx_t< _Tp >, byte_t >, meta::use_if_same_t< try_rx_t< _Tp >, byte_t > > >
 template to catch a proper SPI interface type More...
 

Namespaces

 utl
 STL's core language concepts.
 
 utl::spi
 Abstract base class for spi bus.
 
 utl::spi_i_details
 

Typedefs

template<class _Tp >
using utl::spi_i_details::try_cclock_t = decltype(declval< const _Tp >().clock())
 
template<class _Tp >
using utl::spi_i_details::try_clock_t = decltype(declval< _Tp >().clock(declval< uint32_t >()))
 
template<class _Tp >
using utl::spi_i_details::try_tx_t = decltype(declval< _Tp >().tx_data(declval< byte_t >()))
 
template<class _Tp >
using utl::spi_i_details::try_rx_t = decltype(declval< _Tp >().rx_data())
 

Enumerations

enum  utl::spi::bitOrder { utl::spi::bitOrder::LSB_First =0x01, utl::spi::bitOrder::MSB_First =0x80 }
 
enum  utl::spi::cpol { utl::spi::cpol::LOW =0, utl::spi::cpol::HIGH }
 
enum  utl::spi::cpha { utl::spi::cpha::LOW =0, utl::spi::cpha::HIGH }
 

Detailed Description

An Abstract base class interface for the spi bus.

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 spi.h.