forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
81 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef IMU_BMI160_H | ||
#define IMU_BMI160_H | ||
|
||
#include "../../lib/bmi160-api/bmi160.h" | ||
#include <furi_hal.h> | ||
#include "imu.h" | ||
|
||
// Define constants | ||
#define BMI160_TAG "BMI160" | ||
#define BMI160_DEV_ADDR (0x69 << 1) | ||
|
||
// Function declarations | ||
int8_t bmi160_write_i2c(uint8_t dev_addr, uint8_t reg_addr, uint8_t* data, uint16_t len); | ||
int8_t bmi160_read_i2c(uint8_t dev_addr, uint8_t reg_addr, uint8_t* read_data, uint16_t len); | ||
bool bmi160_begin(void); | ||
int bmi160_read(double* vec); | ||
|
||
#endif // IMU_BMI160_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef IMU_LSM6DS3TRC_H | ||
#define IMU_LSM6DS3TRC_H | ||
|
||
#include "../../lib/lsm6ds3tr-api/lsm6ds3tr-c_reg.h" | ||
|
||
#include <furi_hal.h> | ||
|
||
#include "imu.h" | ||
|
||
#define LSM6DS3_TAG "LSM6DS3TR-C" | ||
|
||
#define LSM6DS3_ADDRESS (0x6A << 1) | ||
|
||
// External variable declaration | ||
extern stmdev_ctx_t lsm6ds3trc_ctx; | ||
|
||
// Function declarations | ||
int32_t lsm6ds3trc_write_i2c(void* handle, uint8_t reg_addr, const uint8_t* data, uint16_t len); | ||
int32_t lsm6ds3trc_read_i2c(void* handle, uint8_t reg_addr, uint8_t* read_data, uint16_t len); | ||
bool lsm6ds3trc_begin(void); | ||
void lsm6ds3trc_end(void); | ||
int lsm6ds3trc_read(double* vec); | ||
|
||
|
||
#endif // LSM6DS3TRC_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters