Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
gyro.h
00001 /** 00002 ****************************************************************************** 00003 * @file gyro.h 00004 * @author MCD Application Team 00005 * @brief This header file contains the functions prototypes for the gyroscope driver. 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * <h2><center>© 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 00021 /* Define to prevent recursive inclusion -------------------------------------*/ 00022 #ifndef __GYRO_H 00023 #define __GYRO_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 /* Includes ------------------------------------------------------------------*/ 00030 #include <stdint.h> 00031 00032 /** @addtogroup BSP 00033 * @{ 00034 */ 00035 00036 /** @addtogroup Components 00037 * @{ 00038 */ 00039 00040 /** @addtogroup GYRO 00041 * @{ 00042 */ 00043 00044 /** @defgroup GYRO_Exported_Types 00045 * @{ 00046 */ 00047 00048 /** @defgroup GYRO_Driver_structure Gyroscope Driver structure 00049 * @{ 00050 */ 00051 typedef struct 00052 { 00053 void (*Init)(uint16_t); 00054 void (*DeInit)(void); 00055 uint8_t (*ReadID)(void); 00056 void (*Reset)(void); 00057 void (*LowPower)(uint16_t); 00058 void (*ConfigIT)(uint16_t); 00059 void (*EnableIT)(uint8_t); 00060 void (*DisableIT)(uint8_t); 00061 uint8_t (*ITStatus)(uint16_t, uint16_t); 00062 void (*ClearIT)(uint16_t, uint16_t); 00063 void (*FilterConfig)(uint8_t); 00064 void (*FilterCmd)(uint8_t); 00065 void (*GetXYZ)(float *); 00066 }GYRO_DrvTypeDef; 00067 /** 00068 * @} 00069 */ 00070 00071 /** @defgroup GYRO_Config_structure Gyroscope Configuration structure 00072 * @{ 00073 */ 00074 00075 typedef struct 00076 { 00077 uint8_t Power_Mode; /* Power-down/Sleep/Normal Mode */ 00078 uint8_t Output_DataRate; /* OUT data rate */ 00079 uint8_t Axes_Enable; /* Axes enable */ 00080 uint8_t Band_Width; /* Bandwidth selection */ 00081 uint8_t BlockData_Update; /* Block Data Update */ 00082 uint8_t Endianness; /* Endian Data selection */ 00083 uint8_t Full_Scale; /* Full Scale selection */ 00084 }GYRO_InitTypeDef; 00085 00086 /* GYRO High Pass Filter struct */ 00087 typedef struct 00088 { 00089 uint8_t HighPassFilter_Mode_Selection; /* Internal filter mode */ 00090 uint8_t HighPassFilter_CutOff_Frequency; /* High pass filter cut-off frequency */ 00091 }GYRO_FilterConfigTypeDef; 00092 00093 /*GYRO Interrupt struct */ 00094 typedef struct 00095 { 00096 uint8_t Latch_Request; /* Latch interrupt request into CLICK_SRC register */ 00097 uint8_t Interrupt_Axes; /* X, Y, Z Axes Interrupts */ 00098 uint8_t Interrupt_ActiveEdge; /* Interrupt Active edge */ 00099 }GYRO_InterruptConfigTypeDef; 00100 00101 /** 00102 * @} 00103 */ 00104 00105 /** 00106 * @} 00107 */ 00108 00109 /** 00110 * @} 00111 */ 00112 00113 /** 00114 * @} 00115 */ 00116 00117 /** 00118 * @} 00119 */ 00120 00121 #ifdef __cplusplus 00122 } 00123 #endif 00124 00125 #endif /* __GYRO_H */ 00126 00127 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed Aug 17 2022 15:47:40 by
