ARMEBS4  revision-26.06.2015
gyroscope.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////
2 /// \file gyroscope.h
3 /// \brief ARMEBS4 eeprom access functions
4 /// \author Pascal Sartoretti (sap at hevs dot ch)
5 /// \defgroup gyroscope Gyroscope
6 ///
7 /// @{
8 ///
9 /// \brief Measures the board's rate of rotation
10 ///
11 /// \ingroup onboard
12 ///
13 /// \image html gyroscope.jpg
14 /// \image latex gyroscope.eps
15 ///
16 /// Measures the device's rate of rotation in around each of the three physical
17 /// axes (x, y, and z).
18 ///
19 /// This kind of device is typically used to :
20 /// - Get the orientation of a vehicle in a GPS device
21 ///
22 //////////////////////////////////////////////////////////////////////////////////
23 #include <stdint.h>
24 #include "heivs/error.h"
25 
26 //////////////////////////////////////////////////////////////////////////////////
27 /// \brief Gyroscope data
28 //////////////////////////////////////////////////////////////////////////////////
30 {
31  int16_t x; ///< x axis gyroscope value (32767 to -32768)
32  int16_t y; ///< y axis gyroscope value (32767 to -32768)
33  int16_t z; ///< z axis gyroscope value (32767 to -32768)
34 };
35 
36 #ifdef __cplusplus
37  extern "C" {
38 #endif
39 
40 //////////////////////////////////////////////////////////////////////////////////
41 /// \brief Initialise the gyroscope
42 /// Accelerometer in initialised for fast acquisition
43 /// \return NO_ERROR for no problem
44 //////////////////////////////////////////////////////////////////////////////////
45 status_e Gyro_Init(void);
46 
47 //////////////////////////////////////////////////////////////////////////////////
48 /// \brief Read the X, Y and Z values from gyroscope
49 /// \param measure The measure
50 /// \\return NO_ERROR for no problem
51 //////////////////////////////////////////////////////////////////////////////////
52 status_e Gyro_Read(struct gyroscope_data_t * measure);
53 
54 //////////////////////////////////////////////////////////////////////////////////
55 /// \brief Write special config to accelrometer
56 /// \param reg Register address to write in
57 /// \param data Data byte to write in this register
58 /// \return NO_ERROR for no problem
59 //////////////////////////////////////////////////////////////////////////////////
60 status_e Gyro_Write(uint8_t reg, uint8_t data);
61 
62 #ifdef __cplusplus
63  }
64 #endif
65 
66 ///
67 /// @}
68 ///
int16_t z
z axis gyroscope value (32767 to -32768)
Definition: gyroscope.h:33
status_e Gyro_Write(uint8_t reg, uint8_t data)
Write special config to accelrometer.
Definition: gyroscope.c:113
Gyroscope data.
Definition: gyroscope.h:29
int16_t y
y axis gyroscope value (32767 to -32768)
Definition: gyroscope.h:32
Errors definitions.
status_e Gyro_Init(void)
Initialise the gyroscope Accelerometer in initialised for fast acquisition.
Definition: gyroscope.c:65
status_e
Known errors.
Definition: error.h:21
status_e Gyro_Read(struct gyroscope_data_t *measure)
Read the X, Y and Z values from gyroscope.
Definition: gyroscope.c:88
int16_t x
x axis gyroscope value (32767 to -32768)
Definition: gyroscope.h:31