X-CUBE-SPN11 for X-NUCLEO-IHM11M1: MC_Common.h Source File

X-CUBE-SPN11 for X-NUCLEO-IHM11M1

MC_Common.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file MC_Common.h
4  * @author System lab - Automation and Motion control team
5  * @version V1.0.0
6  * @date 06-July-2015
7  * @brief This header file is a common file
8  ******************************************************************************
9  * @attention
10  *
11  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
12  *
13  * Redistribution and use in source and binary forms, with or without modification,
14  * are permitted provided that the following conditions are met:
15  * 1. Redistributions of source code must retain the above copyright notice,
16  * this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright notice,
18  * this list of conditions and the following disclaimer in the documentation
19  * and/or other materials provided with the distribution.
20  * 3. Neither the name of STMicroelectronics nor the names of its contributors
21  * may be used to endorse or promote products derived from this software
22  * without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  *
35  ******************************************************************************
36  */
37 
38 
39 /* Define to prevent recursive inclusion -------------------------------------*/
40 #ifndef __MC_COMMON_H
41 #define __MC_COMMON_H
42 
43 /** @addtogroup DRIVERS DRIVERS
44  * @brief Driver Layer
45  * @{
46  */
47 
48 /** @addtogroup BSP BSP
49  * @brief BSP Layer
50  * @{
51  */
52 
53 /** @addtogroup COMPONENTS COMPONENTS
54  * @brief Components
55  * @{
56  */
57 
58 /** @addtogroup STSPIN230_Motor_Driver_handler STSPIN230_Motor_Driver_handler
59  * @brief Handler for STSPIN230 Motor driver
60  * @{
61  */
62 
63  typedef struct
64  {
65  void (*EnableInput_CH1_E_CH2_E_CH3_D)(void); /*!< Enable the channel 1,2 and Disable the channel 3 */
66  void (*EnableInput_CH1_E_CH2_D_CH3_E)(void); /*!< Enable the channel 1,3 and Disable the channel 2 */
67  void (*EnableInput_CH1_D_CH2_E_CH3_E)(void); /*!< Enable the channel 2,3 and Disable the channel 1 */
68  void (*DisableInput_CH1_D_CH2_D_CH3_D)(void); /*!< Disable all channels */
69  void (*Start_PWM_driving)(void); /*!< Start PWM generation */
70  void (*Stop_PWM_driving)(void); /*!< Stop PWM generation */
71  void (*HF_TIMx_SetDutyCycle_CH1)(uint16_t); /*!< High Frequency Timer - Change DutyCycle value for CH1 */
72  void (*HF_TIMx_SetDutyCycle_CH2)(uint16_t); /*!< High Frequency Timer - Change DutyCycle value for CH2 */
73  void (*HF_TIMx_SetDutyCycle_CH3)(uint16_t); /*!< High Frequency Timer - Change DutyCycle value for CH3 */
74  void (*Current_Reference_Start)(void); /*!< Start current reference generation for closed loop control */
75  void (*Current_Reference_Stop)(void); /*!< Stop current reference generation for closed loop control */
76  void (*Current_Reference_Setvalue)(uint16_t); /*!< Set current reference value for closed loop control */
77  } STSPIN230_MotorDriver_TypeDef; /*!< MC driver handler */
78 
79 /**
80  * @} end STSPIN230_Motor_Driver_handler
81  */
82 
83 /**
84  * @} end COMPONENTS
85  */
86 
87 /**
88  * @} end BSP
89  */
90 
91 /**
92  * @} end DRIVERS
93  */
94 
95 #endif
96 
void DisableInput_CH1_D_CH2_D_CH3_D()
Definition: STSPIN230.c:143
void EnableInput_CH1_E_CH2_E_CH3_D()
Definition: STSPIN230.c:96
void EnableInput_CH1_E_CH2_D_CH3_E()
Definition: STSPIN230.c:112
void Current_Reference_Setvalue(uint16_t Iref)
Definition: STSPIN230.c:269
void HF_TIMx_SetDutyCycle_CH2(uint16_t CCR_value)
Definition: STSPIN230.c:204
void HF_TIMx_SetDutyCycle_CH1(uint16_t CCR_value)
Definition: STSPIN230.c:188
void HF_TIMx_SetDutyCycle_CH3(uint16_t CCR_value)
Definition: STSPIN230.c:219
void Current_Reference_Start()
Definition: STSPIN230.c:237
void EnableInput_CH1_D_CH2_E_CH3_E()
Definition: STSPIN230.c:127
void Stop_PWM_driving()
Definition: STSPIN230.c:173
void Start_PWM_driving()
Definition: STSPIN230.c:158
void Current_Reference_Stop()
Definition: STSPIN230.c:253
Generated by   doxygen 1.8.11