Go to the source code of this file.
◆ MPU6050_DisableLowPowerMode()
| void MPU6050_DisableLowPowerMode |
( |
void |
| ) |
|
Definition at line 78 of file mpu6050.c.
78 {
81}
void MPU6050_Write(uint8_t addr, uint8_t dat)
#define MPU6050_REG_PWR_MGMT_2
#define MPU6050_REG_PWR_MGMT_1
◆ MPU6050_DisableTemperature()
Definition at line 68 of file mpu6050.c.
68 {
71}
uint8_t MPU6050_Read(uint8_t addr)
◆ MPU6050_EnableLowPowerMode()
◆ MPU6050_EnterSleepMode()
| void MPU6050_EnterSleepMode |
( |
void |
| ) |
|
◆ MPU6050_Init()
| void MPU6050_Init |
( |
void |
| ) |
|
Definition at line 52 of file mpu6050.c.
52 {
58}
void MPU6050_DisableLowPowerMode(void)
void MPU6050_SetAccFullScaleRange(MPU6050_Acc_FullScaleRange_t range)
void MPU6050_SetDLPF(MPU6050_DLPF_t filter)
void MPU6050_SetSampleRateDiv(uint8_t div)
void MPU6050_SetGyroFullScaleRange(MPU6050_Gyro_FullScaleRange_t range)
@ MPU6050_Acc_FullScaleRange_4g
@ MPU6050_Gyro_FullScaleRange_500dps
◆ MPU6050_Read()
Definition at line 28 of file mpu6050.c.
29{
32 return ret;
33}
uint8_t I2C_Read(uint8_t devAddr, uint8_t memAddr, uint8_t *buf, uint16_t size)
◆ MPU6050_ReadAll()
Definition at line 42 of file mpu6050.c.
43{
46 for (
i = 0;
i < 7;
i++)
47 {
48 *(buf +
i) =
swap(*(buf +
i));
49 }
50}
uint16_t swap(uint16_t num)
#define MPU6050_REG_ACCEL_XOUT_H
◆ MPU6050_ReadInt()
◆ MPU6050_Reset()
| void MPU6050_Reset |
( |
void |
| ) |
|
◆ MPU6050_SetAccFullScaleRange()
Definition at line 103 of file mpu6050.c.
104{
106}
#define MPU6050_REG_ACCEL_CONFIG
◆ MPU6050_SetDLPF()
Definition at line 93 of file mpu6050.c.
94{
96}
#define MPU6050_REG_CONFIG
◆ MPU6050_SetGyroFullScaleRange()
Definition at line 98 of file mpu6050.c.
99{
101}
#define MPU6050_REG_GYRO_CONFIG
◆ MPU6050_SetSampleRateDiv()
| void MPU6050_SetSampleRateDiv |
( |
uint8_t |
div | ) |
|
Sample Rate = Gyroscope Output Rate / (1 + SMPLRT_DIV) where Gyroscope Output Rate = 8kHz when the DLPF is disabled (DLPF_CFG = 0 or 7), and 1kHz when the DLPF is enabled
Definition at line 88 of file mpu6050.c.
89{
91}
#define MPU6050_REG_SMPLRT_DIV
◆ MPU6050_Write()
Definition at line 23 of file mpu6050.c.
24{
26}
uint8_t I2C_Write(uint8_t devAddr, uint8_t memAddr, uint8_t *dat, uint16_t size)
◆ swap()
Definition at line 18 of file mpu6050.c.
19{
20 return (num >> 8) | (num << 8);
21}