cleaned up the defines
This commit is contained in:
parent
604dc1ad60
commit
6477248e3b
|
@ -37,51 +37,6 @@ extern void mock_assert(const int result, const char* const expression,
|
||||||
|
|
||||||
#endif // UNIT_TESTING
|
#endif // UNIT_TESTING
|
||||||
|
|
||||||
/*
|
|
||||||
* ############################
|
|
||||||
* Defines and consts
|
|
||||||
* ############################
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NUM_ACCEL_REGS 6
|
|
||||||
#define NUM_GYRO_REGS 6
|
|
||||||
|
|
||||||
/*GYRO MIN MAX PARAMETERS(percentage)*/
|
|
||||||
#define GYRO_MIN_ST -14
|
|
||||||
#define GYRO_MAX_ST 14
|
|
||||||
|
|
||||||
|
|
||||||
/*GYRO_CONFIG*/
|
|
||||||
#define XG_ST (1<<7)
|
|
||||||
#define YG_ST (1<<6)
|
|
||||||
#define ZG_ST (1<<5)
|
|
||||||
#define FS_SEL_MSK 0x18//0b00011000
|
|
||||||
#define FS_SEL_250 0
|
|
||||||
#define FS_SEL_500 (1<<3)
|
|
||||||
#define FS_SEL_1000 (1<<4)
|
|
||||||
#define FS_SEL_2000 (1<<4)|(1<<3)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ############################
|
|
||||||
* Structures
|
|
||||||
* ############################
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct gy521_module{
|
|
||||||
uint8_t slave_address;
|
|
||||||
gyro_values_struct gyro;
|
|
||||||
accel_values_struct accel;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ft_vals{
|
|
||||||
float x;
|
|
||||||
float y;
|
|
||||||
float z;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ############################
|
* ############################
|
||||||
|
|
|
@ -15,6 +15,25 @@
|
||||||
* ############################
|
* ############################
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define NUM_ACCEL_REGS 6
|
||||||
|
#define NUM_GYRO_REGS 6
|
||||||
|
|
||||||
|
/*GYRO MIN MAX PARAMETERS(percentage)*/
|
||||||
|
#define GYRO_MIN_ST -14
|
||||||
|
#define GYRO_MAX_ST 14
|
||||||
|
|
||||||
|
|
||||||
|
/*GYRO_CONFIG*/
|
||||||
|
#define XG_ST (1<<7)
|
||||||
|
#define YG_ST (1<<6)
|
||||||
|
#define ZG_ST (1<<5)
|
||||||
|
#define FS_SEL_MSK 0x18//0b00011000
|
||||||
|
#define FS_SEL_250 0
|
||||||
|
#define FS_SEL_500 (1<<3)
|
||||||
|
#define FS_SEL_1000 (1<<4)
|
||||||
|
#define FS_SEL_2000 (1<<4)|(1<<3)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ############################
|
* ############################
|
||||||
* Types/Structures
|
* Types/Structures
|
||||||
|
@ -33,6 +52,20 @@ typedef struct accel_values{
|
||||||
uint16_t z;
|
uint16_t z;
|
||||||
}accel_values_struct;
|
}accel_values_struct;
|
||||||
|
|
||||||
|
struct gy521_module{
|
||||||
|
uint8_t slave_address;
|
||||||
|
gyro_values_struct gyro;
|
||||||
|
accel_values_struct accel;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ft_vals{
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float z;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ############################
|
* ############################
|
||||||
* REGISTER MAP
|
* REGISTER MAP
|
||||||
|
|
Loading…
Reference in New Issue