Micro template library A library for building device drivers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

55 line
4.4 KiB

  1. \hypertarget{i2c_8h}{}\section{include/utl/com/i2c.h File Reference}
  2. \label{i2c_8h}\index{include/utl/com/i2c.\+h@{include/utl/com/i2c.\+h}}
  3. An Abstract base class interface for the i2c bus.
  4. {\ttfamily \#include $<$utl/core/impl.\+h$>$}\newline
  5. {\ttfamily \#include $<$utl/core/crtp.\+h$>$}\newline
  6. {\ttfamily \#include $<$utl/meta/meta.\+h$>$}\newline
  7. \subsection*{Classes}
  8. \begin{DoxyCompactItemize}
  9. \item
  10. class \mbox{\hyperlink{classutl_1_1i2c__i}{utl\+::i2c\+\_\+i$<$ impl\+\_\+t $>$}}
  11. \begin{DoxyCompactList}\small\item\em Abstract base class for i2c bus. \end{DoxyCompactList}\item
  12. class \mbox{\hyperlink{classutl_1_1i2c__i_3_01virtual__tag_01_4}{utl\+::i2c\+\_\+i$<$ virtual\+\_\+tag $>$}}
  13. \begin{DoxyCompactList}\small\item\em A virtual base class specialization. \end{DoxyCompactList}\item
  14. struct \mbox{\hyperlink{structutl_1_1i2c__i__details_1_1is__i2c__}{utl\+::i2c\+\_\+i\+\_\+details\+::is\+\_\+i2c\+\_\+$<$ \+\_\+\+Tp, typename $>$}}
  15. \begin{DoxyCompactList}\small\item\em Primary template to catch any non I2C interface types. \end{DoxyCompactList}\item
  16. struct \mbox{\hyperlink{structutl_1_1i2c__i__details_1_1is__i2c___3_01___tp_00_01meta_1_1void__t_3_01typename_01___tp_1_1_sequence_00_01void_01_4_01_4}{utl\+::i2c\+\_\+i\+\_\+details\+::is\+\_\+i2c\+\_\+$<$ \+\_\+\+Tp, meta\+::void\+\_\+t$<$ typename \+\_\+\+Tp\+::\+Sequence, void $>$ $>$}}
  17. \begin{DoxyCompactList}\small\item\em template to catch a proper I2C interface type \end{DoxyCompactList}\end{DoxyCompactItemize}
  18. \subsection*{Namespaces}
  19. \begin{DoxyCompactItemize}
  20. \item
  21. \mbox{\hyperlink{namespaceutl}{utl}}
  22. \begin{DoxyCompactList}\small\item\em S\+TL\textquotesingle{}s core language concepts. \end{DoxyCompactList}\item
  23. \mbox{\hyperlink{namespaceutl_1_1i2c__i__details}{utl\+::i2c\+\_\+i\+\_\+details}}
  24. \end{DoxyCompactItemize}
  25. \subsection*{Typedefs}
  26. \begin{DoxyCompactItemize}
  27. \item
  28. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1i2c__i__details_a81c12a06fe9cf6f643718f9175da8769}{utl\+::i2c\+\_\+i\+\_\+details\+::try\+\_\+cclk\+\_\+t}} = decltype(declval$<$ const \+\_\+\+Tp $>$().clock())
  29. \item
  30. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1i2c__i__details_adaf6b9dbc57caeda1a6a85bd17ac6317}{utl\+::i2c\+\_\+i\+\_\+details\+::try\+\_\+clk\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().clock(declval$<$ uint32\+\_\+t $>$()))
  31. \item
  32. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1i2c__i__details_a173335d0a45cba1b159bf33bcefb3a46}{utl\+::i2c\+\_\+i\+\_\+details\+::try\+\_\+start\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().start())
  33. \item
  34. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1i2c__i__details_a25cbce342478441f05d3a101fcafc02c}{utl\+::i2c\+\_\+i\+\_\+details\+::try\+\_\+stop\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().stop())
  35. \item
  36. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1i2c__i__details_a10de1b351bd683c5435e2db3d682819c}{utl\+::i2c\+\_\+i\+\_\+details\+::try\+\_\+rx\+\_\+data\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().rx\+\_\+data(declval$<$ bool $>$(), declval$<$ typename \+\_\+\+Tp\+::\+Sequence $>$()))
  37. \item
  38. {\footnotesize template$<$class \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1i2c__i__details_ad8d87a56b12244ba8060f8d27207083f}{utl\+::i2c\+\_\+i\+\_\+details\+::try\+\_\+tx\+\_\+data\+\_\+t}} = decltype(declval$<$ \+\_\+\+Tp $>$().tx\+\_\+data(declval$<$ byte\+\_\+t $>$(), declval$<$ typename \+\_\+\+Tp\+::\+Sequence $>$()))
  39. \end{DoxyCompactItemize}
  40. \subsection{Detailed Description}
  41. An Abstract base class interface for the i2c bus.
  42. Copyright (C) 2018 Christos Choutouridis
  43. This program is free software\+: you can redistribute it and/or modify it under the terms of the G\+NU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  44. This program is distributed in the hope that it will be useful, but W\+I\+T\+H\+O\+UT A\+NY W\+A\+R\+R\+A\+N\+TY; without even the implied warranty of M\+E\+R\+C\+H\+A\+N\+T\+A\+B\+I\+L\+I\+TY or F\+I\+T\+N\+E\+SS F\+OR A P\+A\+R\+T\+I\+C\+U\+L\+AR P\+U\+R\+P\+O\+SE. See the G\+NU Lesser General Public License for more details.
  45. You should have received a copy of the G\+NU Lesser General Public License along with this program. If not, see \href{http://www.gnu.org/licenses/}{\tt http\+://www.\+gnu.\+org/licenses/}.