Use BDCMotor_class.h instead of motor_class.h

Dependents:   HelloWorld_IHM04A1

Fork of X_NUCLEO_IHM04A1 by ST

Committer:
Manu_L
Date:
Tue Jun 14 12:14:28 2016 +0000
Revision:
3:b06e38d365d7
Parent:
0:2cb6ce8e07bd
Use BDCMotor_class.h instead of Motor_class.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
brdirais 0:2cb6ce8e07bd 1 /**
brdirais 0:2cb6ce8e07bd 2 ******************************************************************************
brdirais 0:2cb6ce8e07bd 3 * @file component.h
brdirais 0:2cb6ce8e07bd 4 * @author AST
brdirais 0:2cb6ce8e07bd 5 * @version V1.0.0
brdirais 0:2cb6ce8e07bd 6 * @date 1 April 2015
brdirais 0:2cb6ce8e07bd 7 * @brief Generic header file containing a generic component's definitions
brdirais 0:2cb6ce8e07bd 8 * and I/O functions.
brdirais 0:2cb6ce8e07bd 9 ******************************************************************************
brdirais 0:2cb6ce8e07bd 10 * @attention
brdirais 0:2cb6ce8e07bd 11 *
brdirais 0:2cb6ce8e07bd 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
brdirais 0:2cb6ce8e07bd 13 *
brdirais 0:2cb6ce8e07bd 14 * Redistribution and use in source and binary forms, with or without modification,
brdirais 0:2cb6ce8e07bd 15 * are permitted provided that the following conditions are met:
brdirais 0:2cb6ce8e07bd 16 * 1. Redistributions of source code must retain the above copyright notice,
brdirais 0:2cb6ce8e07bd 17 * this list of conditions and the following disclaimer.
brdirais 0:2cb6ce8e07bd 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
brdirais 0:2cb6ce8e07bd 19 * this list of conditions and the following disclaimer in the documentation
brdirais 0:2cb6ce8e07bd 20 * and/or other materials provided with the distribution.
brdirais 0:2cb6ce8e07bd 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
brdirais 0:2cb6ce8e07bd 22 * may be used to endorse or promote products derived from this software
brdirais 0:2cb6ce8e07bd 23 * without specific prior written permission.
brdirais 0:2cb6ce8e07bd 24 *
brdirais 0:2cb6ce8e07bd 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
brdirais 0:2cb6ce8e07bd 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
brdirais 0:2cb6ce8e07bd 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
brdirais 0:2cb6ce8e07bd 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
brdirais 0:2cb6ce8e07bd 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
brdirais 0:2cb6ce8e07bd 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
brdirais 0:2cb6ce8e07bd 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
brdirais 0:2cb6ce8e07bd 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
brdirais 0:2cb6ce8e07bd 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
brdirais 0:2cb6ce8e07bd 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
brdirais 0:2cb6ce8e07bd 35 *
brdirais 0:2cb6ce8e07bd 36 ******************************************************************************
brdirais 0:2cb6ce8e07bd 37 */
brdirais 0:2cb6ce8e07bd 38
brdirais 0:2cb6ce8e07bd 39
brdirais 0:2cb6ce8e07bd 40 /* Define to prevent recursive inclusion -------------------------------------*/
brdirais 0:2cb6ce8e07bd 41
brdirais 0:2cb6ce8e07bd 42 #ifndef __COMPONENT_H
brdirais 0:2cb6ce8e07bd 43 #define __COMPONENT_H
brdirais 0:2cb6ce8e07bd 44
brdirais 0:2cb6ce8e07bd 45
brdirais 0:2cb6ce8e07bd 46 /* Types ---------------------------------------------------------------------*/
brdirais 0:2cb6ce8e07bd 47
brdirais 0:2cb6ce8e07bd 48 /**
brdirais 0:2cb6ce8e07bd 49 * @brief Component's Context structure definition.
brdirais 0:2cb6ce8e07bd 50 */
brdirais 0:2cb6ce8e07bd 51 typedef struct
brdirais 0:2cb6ce8e07bd 52 {
brdirais 0:2cb6ce8e07bd 53 /* Identity. */
brdirais 0:2cb6ce8e07bd 54 uint8_t who_am_i;
brdirais 0:2cb6ce8e07bd 55
brdirais 0:2cb6ce8e07bd 56 /* ACTION ----------------------------------------------------------------*/
brdirais 0:2cb6ce8e07bd 57 /* There should be only a unique identifier for each component, which */
brdirais 0:2cb6ce8e07bd 58 /* should be the "who_am_i" parameter, hence this parameter is optional. */
brdirais 0:2cb6ce8e07bd 59 /* -----------------------------------------------------------------------*/
brdirais 0:2cb6ce8e07bd 60 /* Type. */
brdirais 0:2cb6ce8e07bd 61 uint8_t type;
brdirais 0:2cb6ce8e07bd 62
brdirais 0:2cb6ce8e07bd 63 /* Configuration. */
brdirais 0:2cb6ce8e07bd 64 uint8_t address;
brdirais 0:2cb6ce8e07bd 65
brdirais 0:2cb6ce8e07bd 66 /* Pointer to the Data. */
brdirais 0:2cb6ce8e07bd 67 void *pData;
brdirais 0:2cb6ce8e07bd 68
brdirais 0:2cb6ce8e07bd 69 /* Pointer to the Virtual Table. */
brdirais 0:2cb6ce8e07bd 70 void *pVTable;
brdirais 0:2cb6ce8e07bd 71
brdirais 0:2cb6ce8e07bd 72 /* ACTION ----------------------------------------------------------------*/
brdirais 0:2cb6ce8e07bd 73 /* There should be only a unique virtual table for each component, which */
brdirais 0:2cb6ce8e07bd 74 /* should be the "pVTable" parameter, hence this parameter is optional. */
brdirais 0:2cb6ce8e07bd 75 /* -----------------------------------------------------------------------*/
brdirais 0:2cb6ce8e07bd 76 /* Pointer to the Extended Virtual Table. */
brdirais 0:2cb6ce8e07bd 77 void *pExtVTable;
brdirais 0:2cb6ce8e07bd 78 } Handle_t;
brdirais 0:2cb6ce8e07bd 79
brdirais 0:2cb6ce8e07bd 80 /**
brdirais 0:2cb6ce8e07bd 81 * @brief Component's Status enumerator definition.
brdirais 0:2cb6ce8e07bd 82 */
brdirais 0:2cb6ce8e07bd 83 typedef enum
brdirais 0:2cb6ce8e07bd 84 {
brdirais 0:2cb6ce8e07bd 85 COMPONENT_OK = 0,
brdirais 0:2cb6ce8e07bd 86 COMPONENT_ERROR,
brdirais 0:2cb6ce8e07bd 87 COMPONENT_TIMEOUT,
brdirais 0:2cb6ce8e07bd 88 COMPONENT_NOT_IMPLEMENTED
brdirais 0:2cb6ce8e07bd 89 } Status_t;
brdirais 0:2cb6ce8e07bd 90
brdirais 0:2cb6ce8e07bd 91 #endif /* __COMPONENT_H */
brdirais 0:2cb6ce8e07bd 92
brdirais 0:2cb6ce8e07bd 93 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
brdirais 0:2cb6ce8e07bd 94