Loading...
Searching...
No Matches
gyroscope.h
Go to the documentation of this file.
1
7
8// ALLOW FORMATTING
9#ifndef GYRO_H
10#define GYRO_H
11
12#include "stdint.h"
13
14typedef struct Gyro {
24 void (*update)(struct Gyro *gyro);
25
36 void (*readGyro)(struct Gyro *gyro, float *out);
37
48 void (*readRawBytes)(struct Gyro *, uint8_t *);
49
61 void (*processRawBytes)(struct Gyro *, uint8_t *, float *);
62
63 uint8_t dataSize;
64 uint8_t *axes;
65 int8_t *sign;
66 uint8_t *rawGyroData;
67 float *gyroData;
68 float *bias;
69 float sensitivity;
70} Gyro_t;
71
73#endif
uint8_t * axes
Array defining axes of mounting.
Definition gyroscope.h:64
int8_t * sign
Array defining sign of axes.
Definition gyroscope.h:65
void(* readRawBytes)(struct Gyro *, uint8_t *)
Pointer to readRawBytes method.
Definition gyroscope.h:48
float * gyroData
Processed angular rates array.
Definition gyroscope.h:67
uint8_t * rawGyroData
Raw angular rates array.
Definition gyroscope.h:66
void(* update)(struct Gyro *gyro)
Pointer to update method.
Definition gyroscope.h:24
float * bias
Bias offset array.
Definition gyroscope.h:68
uint8_t dataSize
Total data size.
Definition gyroscope.h:63
void(* processRawBytes)(struct Gyro *, uint8_t *, float *)
Pointer to processRawBytes method.
Definition gyroscope.h:61
void(* readGyro)(struct Gyro *gyro, float *out)
Pointer to readGyro method.
Definition gyroscope.h:36