ST / BSP_DISCO_L4R9I

Dependents:   DISCO_L4R9I-LCD-demo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers accelero.h Source File

accelero.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    accelero.h
00004   * @author  MCD Application Team
00005   * @brief   This header file contains the functions prototypes for the Accelerometer driver.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019 
00020 /* Define to prevent recursive inclusion -------------------------------------*/
00021 #ifndef __ACCELERO_H
00022 #define __ACCELERO_H
00023 
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027 
00028 /* Includes ------------------------------------------------------------------*/
00029 #include <stdint.h>
00030 
00031 /** @addtogroup BSP
00032   * @{
00033   */
00034 
00035 /** @addtogroup Components
00036   * @{
00037   */
00038     
00039 /** @addtogroup ACCELERO
00040   * @{
00041   */
00042 
00043 /** @defgroup ACCELERO_Exported_Types
00044   * @{
00045   */ 
00046 
00047 /** @defgroup ACCELERO_Driver_structure  Accelerometer Driver structure
00048   * @{
00049   */
00050 typedef struct
00051 {  
00052   void      (*Init)(uint16_t);
00053   void      (*DeInit)(void); 
00054   uint8_t   (*ReadID)(void);
00055   void      (*Reset)(void);
00056   void      (*LowPower)(uint16_t);
00057   void      (*ConfigIT)(void);
00058   void      (*EnableIT)(uint8_t);
00059   void      (*DisableIT)(uint8_t);
00060   uint8_t   (*ITStatus)(uint16_t);
00061   void      (*ClearIT)(void);
00062   void      (*FilterConfig)(uint8_t);
00063   void      (*FilterCmd)(uint8_t);
00064   void      (*GetXYZ)(int16_t *);
00065 }ACCELERO_DrvTypeDef;
00066 /**
00067   * @}
00068   */
00069 
00070 /** @defgroup ACCELERO_Configuration_structure  Accelerometer Configuration structure
00071   * @{
00072   */
00073 
00074 /* ACCELERO struct */
00075 typedef struct
00076 {
00077   uint8_t Power_Mode;                         /* Power-down/Normal Mode */
00078   uint8_t AccOutput_DataRate;                 /* OUT data rate */
00079   uint8_t Axes_Enable;                        /* Axes enable */
00080   uint8_t High_Resolution;                    /* High Resolution enabling/disabling */
00081   uint8_t BlockData_Update;                   /* Block Data Update */
00082   uint8_t Endianness;                         /* Endian Data selection */
00083   uint8_t AccFull_Scale;                      /* Full Scale selection */
00084   uint8_t Communication_Mode;
00085 }ACCELERO_InitTypeDef;
00086 
00087 /* ACCELERO High Pass Filter struct */
00088 typedef struct
00089 {
00090   uint8_t HighPassFilter_Mode_Selection;      /* Internal filter mode */
00091   uint8_t HighPassFilter_CutOff_Frequency;    /* High pass filter cut-off frequency */
00092   uint8_t HighPassFilter_AOI1;                /* HPF_enabling/disabling for AOI function on interrupt 1 */
00093   uint8_t HighPassFilter_AOI2;                /* HPF_enabling/disabling for AOI function on interrupt 2 */
00094   uint8_t HighPassFilter_Data_Sel;
00095   uint8_t HighPassFilter_Stat;
00096 }ACCELERO_FilterConfigTypeDef;
00097 
00098 /**
00099   * @}
00100   */
00101 
00102 
00103 /**
00104   * @}
00105   */
00106 
00107 /**
00108   * @}
00109   */
00110 
00111 /**
00112   * @}
00113   */
00114 
00115 /**
00116   * @}
00117   */
00118 
00119 #ifdef __cplusplus
00120 }
00121 #endif
00122 
00123 #endif /* __ACCELERO_H */
00124 
00125 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/