Farnell-Element14 Bologna IOT Team / BSP_B-L475E-IOT01

Dependencies:   VL53L0X

Fork of BSP_B-L475E-IOT01 by ST

Committer:
fabio_gatti
Date:
Tue Aug 07 10:45:50 2018 +0000
Revision:
8:8cb54b28bc45
Parent:
6:9dfa42666f03
aggiunta la lettura laser e modificata la string di stampa su schermo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 3:c6b5944187d5 1 /**
bcostm 3:c6b5944187d5 2 ******************************************************************************
bcostm 3:c6b5944187d5 3 * @file stm32l475e_iot01_gyro.h
bcostm 3:c6b5944187d5 4 * @author MCD Application Team
bcostm 3:c6b5944187d5 5 * @brief This file contains definitions for the stm32l475e_iot01_gyro.c
bcostm 3:c6b5944187d5 6 ******************************************************************************
bcostm 3:c6b5944187d5 7 * @attention
bcostm 3:c6b5944187d5 8 *
bcostm 3:c6b5944187d5 9 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics International N.V.
bcostm 3:c6b5944187d5 10 * All rights reserved.</center></h2>
bcostm 3:c6b5944187d5 11 *
bcostm 3:c6b5944187d5 12 * Redistribution and use in source and binary forms, with or without
bcostm 3:c6b5944187d5 13 * modification, are permitted, provided that the following conditions are met:
bcostm 3:c6b5944187d5 14 *
bcostm 3:c6b5944187d5 15 * 1. Redistribution of source code must retain the above copyright notice,
bcostm 3:c6b5944187d5 16 * this list of conditions and the following disclaimer.
bcostm 3:c6b5944187d5 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
bcostm 3:c6b5944187d5 18 * this list of conditions and the following disclaimer in the documentation
bcostm 3:c6b5944187d5 19 * and/or other materials provided with the distribution.
bcostm 3:c6b5944187d5 20 * 3. Neither the name of STMicroelectronics nor the names of other
bcostm 3:c6b5944187d5 21 * contributors to this software may be used to endorse or promote products
bcostm 3:c6b5944187d5 22 * derived from this software without specific written permission.
bcostm 3:c6b5944187d5 23 * 4. This software, including modifications and/or derivative works of this
bcostm 3:c6b5944187d5 24 * software, must execute solely and exclusively on microcontroller or
bcostm 3:c6b5944187d5 25 * microprocessor devices manufactured by or for STMicroelectronics.
bcostm 3:c6b5944187d5 26 * 5. Redistribution and use of this software other than as permitted under
bcostm 3:c6b5944187d5 27 * this license is void and will automatically terminate your rights under
bcostm 3:c6b5944187d5 28 * this license.
bcostm 3:c6b5944187d5 29 *
bcostm 3:c6b5944187d5 30 * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
bcostm 3:c6b5944187d5 31 * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
bcostm 3:c6b5944187d5 32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
bcostm 3:c6b5944187d5 33 * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
bcostm 3:c6b5944187d5 34 * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
bcostm 3:c6b5944187d5 35 * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
bcostm 3:c6b5944187d5 36 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
bcostm 3:c6b5944187d5 37 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
bcostm 3:c6b5944187d5 38 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
bcostm 3:c6b5944187d5 39 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
bcostm 3:c6b5944187d5 40 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
bcostm 3:c6b5944187d5 41 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bcostm 3:c6b5944187d5 42 *
bcostm 3:c6b5944187d5 43 ******************************************************************************
bcostm 3:c6b5944187d5 44 */
bcostm 3:c6b5944187d5 45
bcostm 3:c6b5944187d5 46 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 3:c6b5944187d5 47 #ifndef __STM32L475E_IOT01_GYRO_H
bcostm 3:c6b5944187d5 48 #define __STM32L475E_IOT01_GYRO_H
bcostm 3:c6b5944187d5 49
bcostm 3:c6b5944187d5 50 #ifdef __cplusplus
bcostm 3:c6b5944187d5 51 extern "C" {
bcostm 3:c6b5944187d5 52 #endif
bcostm 3:c6b5944187d5 53
bcostm 3:c6b5944187d5 54 /* Includes ------------------------------------------------------------------*/
bcostm 3:c6b5944187d5 55 #include "stm32l475e_iot01.h"
bcostm 3:c6b5944187d5 56 /* Include Gyro component driver */
bcostm 3:c6b5944187d5 57 #include "../Components/lsm6dsl/lsm6dsl.h"
bcostm 3:c6b5944187d5 58
bcostm 3:c6b5944187d5 59 /** @addtogroup BSP
bcostm 3:c6b5944187d5 60 * @{
bcostm 3:c6b5944187d5 61 */
bcostm 3:c6b5944187d5 62
bcostm 3:c6b5944187d5 63 /** @addtogroup STM32L475E_IOT01
bcostm 3:c6b5944187d5 64 * @{
bcostm 3:c6b5944187d5 65 */
bcostm 3:c6b5944187d5 66
bcostm 3:c6b5944187d5 67 /** @addtogroup STM32L475E_IOT01_GYROSCOPE
bcostm 3:c6b5944187d5 68 * @{
bcostm 3:c6b5944187d5 69 */
bcostm 3:c6b5944187d5 70
bcostm 3:c6b5944187d5 71 /** @defgroup STM32L475_IOT01_GYROSCOPE_Exported_Constants GYROSCOPE Exported Constants
bcostm 3:c6b5944187d5 72 * @{
bcostm 3:c6b5944187d5 73 */
bcostm 3:c6b5944187d5 74 typedef enum
bcostm 3:c6b5944187d5 75 {
bcostm 3:c6b5944187d5 76 GYRO_OK = 0,
bcostm 3:c6b5944187d5 77 GYRO_ERROR = 1,
bcostm 3:c6b5944187d5 78 GYRO_TIMEOUT = 2
bcostm 3:c6b5944187d5 79 }
bcostm 3:c6b5944187d5 80 GYRO_StatusTypeDef;
bcostm 3:c6b5944187d5 81
bcostm 3:c6b5944187d5 82 /**
bcostm 3:c6b5944187d5 83 * @}
bcostm 3:c6b5944187d5 84 */
bcostm 3:c6b5944187d5 85
bcostm 3:c6b5944187d5 86 /** @defgroup STM32L475E_IOT01_GYROSCOPE_Exported_Functions GYROSCOPE Exported Functions
bcostm 3:c6b5944187d5 87 * @{
bcostm 3:c6b5944187d5 88 */
bcostm 3:c6b5944187d5 89 uint8_t BSP_GYRO_Init(void);
bcostm 3:c6b5944187d5 90 void BSP_GYRO_DeInit(void);
bcostm 3:c6b5944187d5 91 void BSP_GYRO_LowPower(uint16_t status); /* 0 Means Disable Low Power Mode, otherwise Low Power Mode is enabled */
bcostm 3:c6b5944187d5 92 void BSP_GYRO_GetXYZ(float* pfData);
bcostm 3:c6b5944187d5 93 /**
bcostm 3:c6b5944187d5 94 * @}
bcostm 3:c6b5944187d5 95 */
bcostm 3:c6b5944187d5 96
bcostm 3:c6b5944187d5 97 /**
bcostm 3:c6b5944187d5 98 * @}
bcostm 3:c6b5944187d5 99 */
bcostm 3:c6b5944187d5 100
bcostm 3:c6b5944187d5 101 /**
bcostm 3:c6b5944187d5 102 * @}
bcostm 3:c6b5944187d5 103 */
bcostm 3:c6b5944187d5 104
bcostm 3:c6b5944187d5 105 /**
bcostm 3:c6b5944187d5 106 * @}
bcostm 3:c6b5944187d5 107 */
bcostm 3:c6b5944187d5 108 #ifdef __cplusplus
bcostm 3:c6b5944187d5 109 }
bcostm 3:c6b5944187d5 110 #endif
bcostm 3:c6b5944187d5 111
bcostm 3:c6b5944187d5 112 #endif /* __STM32L475E_IOT01_GYRO_H */
bcostm 3:c6b5944187d5 113
bcostm 3:c6b5944187d5 114 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/