Rpi-hw  0.7.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
m7seg-inl.hpp
1 /*
2  Title --- display/m7seg-inl.hpp
3 
4  Copyright (C) 2013 Giacomo Trudu - wicker25[at]gmail[dot]com
5 
6  This file is part of Rpi-hw.
7 
8  Rpi-hw is free software: you can redistribute it and/or modify
9  it under the terms of the GNU Lesser General Public License as published by
10  the Free Software Foundation version 3 of the License.
11 
12  Rpi-hw is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with Rpi-hw. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _RPI_HW_DISPLAY_M7SEG_INL_HPP_
23 #define _RPI_HW_DISPLAY_M7SEG_INL_HPP_
24 
25 namespace rpihw { // Begin main namespace
26 
27 namespace display { // Begin displays namespace
28 
29 inline void
30 m7seg::setDisplays( size_t ndisplay, iface::output &enabler ) {
31 
32  // Store the number of displays and the enabler interface
33  m_ndisplay = ndisplay;
34  m_enabler = &enabler;
35 }
36 
37 inline void
38 m7seg::setFreq( float frequency ) {
39 
40  // Store the updating frequency
41  m_frequency = frequency;
42 }
43 
44 inline float
45 m7seg::getFreq() const {
46 
47  // Return the updating frequency
48  return m_frequency;
49 }
50 
51 } // End of displays namespace
52 
53 } // End of main namespace
54 
55 #endif /* _RPI_HW_DISPLAY_M7SEG_INL_HPP_ */
Output interface.
Definition: output.hpp:43
void setDisplays(size_t total, iface::output &enabler)
Sets the number of displays and the enabler interface.
Definition: m7seg-inl.hpp:30
size_t m_ndisplay
Number of the displays.
Definition: m7seg.hpp:121
float m_frequency
Updating frequency (Hz).
Definition: m7seg.hpp:124
float getFreq() const
Returns the updating frequency.
Definition: m7seg-inl.hpp:45
iface::output * m_enabler
Enabler interface.
Definition: m7seg.hpp:133
void setFreq(float frequency)
Sets the updating frequency.
Definition: m7seg-inl.hpp:38