ble

Dependencies:   HC_SR04_Ultrasonic_Library Servo mbed

Fork of FIP_REV1 by Robotique FIP

Committer:
julientiron
Date:
Tue May 19 16:53:44 2015 +0000
Revision:
1:bdbf36f8408d
ddd; ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
julientiron 1:bdbf36f8408d 1 /**
julientiron 1:bdbf36f8408d 2 ******************************************************************************
julientiron 1:bdbf36f8408d 3 * @file magneto.h
julientiron 1:bdbf36f8408d 4 * @author MEMS Application Team
julientiron 1:bdbf36f8408d 5 * @version V1.0.0
julientiron 1:bdbf36f8408d 6 * @date 30-July-2014
julientiron 1:bdbf36f8408d 7 * @brief This header file contains the functions prototypes for the
julientiron 1:bdbf36f8408d 8 * magneto driver.
julientiron 1:bdbf36f8408d 9 ******************************************************************************
julientiron 1:bdbf36f8408d 10 * @attention
julientiron 1:bdbf36f8408d 11 *
julientiron 1:bdbf36f8408d 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
julientiron 1:bdbf36f8408d 13 *
julientiron 1:bdbf36f8408d 14 * Redistribution and use in source and binary forms, with or without modification,
julientiron 1:bdbf36f8408d 15 * are permitted provided that the following conditions are met:
julientiron 1:bdbf36f8408d 16 * 1. Redistributions of source code must retain the above copyright notice,
julientiron 1:bdbf36f8408d 17 * this list of conditions and the following disclaimer.
julientiron 1:bdbf36f8408d 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
julientiron 1:bdbf36f8408d 19 * this list of conditions and the following disclaimer in the documentation
julientiron 1:bdbf36f8408d 20 * and/or other materials provided with the distribution.
julientiron 1:bdbf36f8408d 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
julientiron 1:bdbf36f8408d 22 * may be used to endorse or promote products derived from this software
julientiron 1:bdbf36f8408d 23 * without specific prior written permission.
julientiron 1:bdbf36f8408d 24 *
julientiron 1:bdbf36f8408d 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
julientiron 1:bdbf36f8408d 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
julientiron 1:bdbf36f8408d 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
julientiron 1:bdbf36f8408d 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
julientiron 1:bdbf36f8408d 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
julientiron 1:bdbf36f8408d 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
julientiron 1:bdbf36f8408d 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
julientiron 1:bdbf36f8408d 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
julientiron 1:bdbf36f8408d 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
julientiron 1:bdbf36f8408d 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
julientiron 1:bdbf36f8408d 35 *
julientiron 1:bdbf36f8408d 36 ******************************************************************************
julientiron 1:bdbf36f8408d 37 */
julientiron 1:bdbf36f8408d 38
julientiron 1:bdbf36f8408d 39
julientiron 1:bdbf36f8408d 40 /* Define to prevent recursive inclusion -------------------------------------*/
julientiron 1:bdbf36f8408d 41 #ifndef __MAGNETO_H
julientiron 1:bdbf36f8408d 42 #define __MAGNETO_H
julientiron 1:bdbf36f8408d 43
julientiron 1:bdbf36f8408d 44 #ifdef __cplusplus
julientiron 1:bdbf36f8408d 45 extern "C" {
julientiron 1:bdbf36f8408d 46 #endif
julientiron 1:bdbf36f8408d 47
julientiron 1:bdbf36f8408d 48 /* Includes ------------------------------------------------------------------*/
julientiron 1:bdbf36f8408d 49 #include <stdint.h>
julientiron 1:bdbf36f8408d 50
julientiron 1:bdbf36f8408d 51
julientiron 1:bdbf36f8408d 52 /**
julientiron 1:bdbf36f8408d 53 * @brief MAGNETO init structure definition
julientiron 1:bdbf36f8408d 54 */
julientiron 1:bdbf36f8408d 55 typedef struct
julientiron 1:bdbf36f8408d 56 {
julientiron 1:bdbf36f8408d 57 uint8_t M_OutputDataRate;
julientiron 1:bdbf36f8408d 58 uint8_t M_OperatingMode;
julientiron 1:bdbf36f8408d 59 uint8_t M_FullScale;
julientiron 1:bdbf36f8408d 60 uint8_t M_XYOperativeMode;
julientiron 1:bdbf36f8408d 61 }MAGNETO_InitTypeDef;
julientiron 1:bdbf36f8408d 62
julientiron 1:bdbf36f8408d 63 /**
julientiron 1:bdbf36f8408d 64 * @brief MAGNETO status enumerator definition
julientiron 1:bdbf36f8408d 65 */
julientiron 1:bdbf36f8408d 66 typedef enum {
julientiron 1:bdbf36f8408d 67 MAGNETO_OK = 0,
julientiron 1:bdbf36f8408d 68 MAGNETO_ERROR = 1,
julientiron 1:bdbf36f8408d 69 MAGNETO_TIMEOUT = 2
julientiron 1:bdbf36f8408d 70 } MAGNETO_StatusTypeDef;
julientiron 1:bdbf36f8408d 71
julientiron 1:bdbf36f8408d 72 /**
julientiron 1:bdbf36f8408d 73 * @brief MAGNETO driver structure definition
julientiron 1:bdbf36f8408d 74 */
julientiron 1:bdbf36f8408d 75 typedef struct
julientiron 1:bdbf36f8408d 76 {
julientiron 1:bdbf36f8408d 77 void (*Init)(MAGNETO_InitTypeDef *);
julientiron 1:bdbf36f8408d 78 uint8_t (*Read_M_ID)(void);
julientiron 1:bdbf36f8408d 79 void (*Get_M_Axes)(int32_t *);
julientiron 1:bdbf36f8408d 80 }MAGNETO_DrvTypeDef;
julientiron 1:bdbf36f8408d 81
julientiron 1:bdbf36f8408d 82
julientiron 1:bdbf36f8408d 83 #ifdef __cplusplus
julientiron 1:bdbf36f8408d 84 }
julientiron 1:bdbf36f8408d 85 #endif
julientiron 1:bdbf36f8408d 86
julientiron 1:bdbf36f8408d 87 #endif /* __MAGNETO_H */
julientiron 1:bdbf36f8408d 88
julientiron 1:bdbf36f8408d 89 /**
julientiron 1:bdbf36f8408d 90 * @}
julientiron 1:bdbf36f8408d 91 */
julientiron 1:bdbf36f8408d 92
julientiron 1:bdbf36f8408d 93 /**
julientiron 1:bdbf36f8408d 94 * @}
julientiron 1:bdbf36f8408d 95 */
julientiron 1:bdbf36f8408d 96
julientiron 1:bdbf36f8408d 97 /**
julientiron 1:bdbf36f8408d 98 * @}
julientiron 1:bdbf36f8408d 99 */
julientiron 1:bdbf36f8408d 100
julientiron 1:bdbf36f8408d 101
julientiron 1:bdbf36f8408d 102 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
julientiron 1:bdbf36f8408d 103