ConOpSys V2970  P004.07
ANVILEX control operating system
SPI1_P016_05_PUC2.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file SPI1_P016_05_PUC2.h
3 //! @brief STM32F410CBU6 SPI1 master class header file.
4 //! @copyright ANVILEX LLC
5 //! @attention No special attention requered.
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Hardware/P016_05_PUC2/SPI1_P016_05_PUC2.h $
7 //! $Revision: 2203 $
8 //! $Date: 2020-11-21 14:58:09 +0500 (Sa, 21 Nov 2020) $
9 //! $Author: minch $
10 //
11 // Copyright(C) 2015-2020 ANVILEX LLC
12 //
13 // Redistribution and use in source and binary forms, with or without
14 // modification, are permitted provided that the following conditions are met:
15 //
16 // 1. Redistributions of source code must retain the above copyright notice,
17 // this list of conditions and the following disclaimer.
18 //
19 // 2. Redistributions in binary form must reproduce the above copyright notice,
20 // this list of conditions and the following disclaimer in the documentation
21 // and/or other materials provided with the distribution.
22 //
23 // 3. Neither the name of ANVILEX nor the names of its contributors may be
24 // used to endorse or promote products derived from this software without
25 // specific prior written permission.
26 //
27 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
31 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 // POSSIBILITY OF SUCH DAMAGE.
38 //
39 //------------------------------------------------------------------------------
40 
41 #pragma once
42 
43 //------------------------------------------------------------------------------
44 // Include project files
45 //------------------------------------------------------------------------------
46 
47 #include "SPI1_STM32F410CBU6.h"
48 
49 //------------------------------------------------------------------------------
50 // Class declarations
51 //------------------------------------------------------------------------------
52 
53 //! @brief On chip SPI1 bus master unit class
55 {
56 
57  //----------------------------------------------------------------------------
58  // Public defines, methods and variables
59  //----------------------------------------------------------------------------
60 
61  public:
62 
63  //--------------------------------------------------------------------------
64  // Public methods
65  //--------------------------------------------------------------------------
66 
67  //!-------------------------------------------------------------------------
68  //! @brief Class constructor method
69  //! @note None
70  //! \par Override
71  //! Not allowed
72  //! @attention Don't call this method directly.
73  //--------------------------------------------------------------------------
74 
76 
77  //!-------------------------------------------------------------------------
78  //! @brief Class destructor method
79  //! @note None
80  //! \par Override
81  //! Not allowed
82  //! @attention Don't call this method directly.
83  //--------------------------------------------------------------------------
84 
85  virtual ~TSPI1_P016_05_PUC2();
86 
87  //!-------------------------------------------------------------------------
88  //! @brief PIO initialisation method
89  //! @note None
90  //! @return None
91  //! \par Override
92  //! Not allowed
93  //! @attention None
94  //--------------------------------------------------------------------------
95 
96  virtual VOID PIO_Init();
97 
98  //!-------------------------------------------------------------------------
99  //! @brief PIO reinitialisation as GPIO method
100  //! @note None
101  //! @return None
102  //! \par Override
103  //! Not allowed
104  //! @attention None
105  //--------------------------------------------------------------------------
106 
107  virtual VOID PIO_Done();
108 
109  //!-------------------------------------------------------------------------
110  //! @brief Activate (set to 0) SPI bus chip select signal
111  //! @note None
112  //! @return None
113  //! \par Override
114  //! Not allowed
115  //! @attention None
116  //--------------------------------------------------------------------------
117 
118  virtual VOID CS_Activate();
119 
120  //!-------------------------------------------------------------------------
121  //! @brief Deactivate (set to 1) SPI bus chip select signal
122  //! @note None
123  //! @return None
124  //! \par Override
125  //! Not allowed
126  //! @attention None
127  //--------------------------------------------------------------------------
128 
129  virtual VOID CS_Deactivate();
130 
131  //!-------------------------------------------------------------------------
132  //! @brief Set MOSI in high state
133  //! @note None
134  //! @return None
135  //! \par Override
136  //! Requered
137  //! @attention None
138  //--------------------------------------------------------------------------
139 
140  virtual VOID Set_MOSI();
141 
142  //!-------------------------------------------------------------------------
143  //! @brief Set MOSI in low state
144  //! @note None
145  //! @return None
146  //! \par Override
147  //! Requered
148  //! @attention None
149  //--------------------------------------------------------------------------
150 
151  virtual VOID Clear_MOSI();
152 
153  //!-------------------------------------------------------------------------
154  //! @brief Set clock in low state
155  //! @note None
156  //! @return None
157  //! \par Override
158  //! Requered
159  //! @attention None
160  //--------------------------------------------------------------------------
161 
162  virtual VOID Clear_Clock();
163 
164  //!-------------------------------------------------------------------------
165  //! @brief Set clock in high state
166  //! @note None
167  //! @return None
168  //! \par Override
169  //! Requered
170  //! @attention None
171  //--------------------------------------------------------------------------
172 
173  virtual VOID Set_Clock();
174 
175  //!-------------------------------------------------------------------------
176  //! @brief Get MISO pin state
177  //! @note None
178  //! @return None
179  //! \par Override
180  //! Requered
181  //! @attention None
182  //--------------------------------------------------------------------------
183 
184  virtual BOOL Get_MISO();
185 
186  //----------------------------------------------------------------------------
187  // Protected defines, methods and variables
188  //----------------------------------------------------------------------------
189 
190  protected:
191 
192  //----------------------------------------------------------------------------
193  // Private defines, methods and variables
194  //----------------------------------------------------------------------------
195 
196  private:
197 
198 };
199 
200 //------------------------------------------------------------------------------
201 // End of file
202 //------------------------------------------------------------------------------
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
STM32F410CBU6 on-chip SPI1 bus master module class header file.
On chip SPI1 bus master unit class.
Definition: SPI1_P016_05_PUC2.h:55
virtual VOID PIO_Init()
PIO initialisation method.
Definition: SPI1_P016_05_PUC2.cpp:87
TSPI1_P016_05_PUC2()
Class constructor method.
Definition: SPI1_P016_05_PUC2.cpp:71
virtual VOID Clear_Clock()
Set clock in low state.
Definition: SPI1_P016_05_PUC2.cpp:199
virtual VOID Set_MOSI()
Set MOSI in high state.
Definition: SPI1_P016_05_PUC2.cpp:175
virtual ~TSPI1_P016_05_PUC2()
Class destructor method.
Definition: SPI1_P016_05_PUC2.cpp:79
virtual VOID Set_Clock()
Set clock in high state.
Definition: SPI1_P016_05_PUC2.cpp:211
virtual VOID CS_Activate()
Activate (set to 0) SPI bus chip select signal.
Definition: SPI1_P016_05_PUC2.cpp:149
virtual VOID Clear_MOSI()
Set MOSI in low state.
Definition: SPI1_P016_05_PUC2.cpp:187
virtual VOID CS_Deactivate()
Deactivate (set to 1) SPI bus chip select signal.
Definition: SPI1_P016_05_PUC2.cpp:162
virtual VOID PIO_Done()
PIO reinitialisation as GPIO method.
Definition: SPI1_P016_05_PUC2.cpp:121
virtual BOOL Get_MISO()
Get MISO pin state.
Definition: SPI1_P016_05_PUC2.cpp:223
STM32F410CBU6 on-chip SPI1 bus master module class.
Definition: SPI1_STM32F410CBU6.h:54