PER Firmware
Loading...
Searching...
No Matches
bmi088.c File Reference

BMI088 IMU driver. More...

#include "bmi088.h"
#include <stdbool.h>
#include <stdint.h>
#include "common/phal/spi.h"
#include "common_defs.h"
#include "main.h"

Functions

bool BMI088_init (BMI088_Handle_t *bmi)
 
void BMI088_wakeAccel (BMI088_Handle_t *bmi)
 
bool BMI088_initAccel (BMI088_Handle_t *bmi)
 Setup the accelerometer, must be done 50ms or longer after POR.
 
bool BMI088_gyroOK (BMI088_Handle_t *bmi)
 Do self test of gyroscope.
 
bool BMI088_gyroSelfTestStart (BMI088_Handle_t *bmi)
 Start the gyro self test.
 
bool BMI088_gyroSelfTestComplete (BMI088_Handle_t *bmi)
 Check the status of the most recent Gyro self test.
 
bool BMI088_gyroSelfTestPass (BMI088_Handle_t *bmi)
 Check the status of the most recent Gyro self test.
 
uint8_t BMI088_checkGyroHealth (BMI088_Handle_t *bmi)
 
bool BMI088_readGyro (BMI088_Handle_t *bmi)
 Blocking function to read the most recent Data Sample from the gyro.
 
bool BMI088_readAccel (BMI088_Handle_t *bmi)
 Blocking function to read the acceleration values form the device.
 

Detailed Description

Function Documentation

◆ BMI088_gyroOK()

bool BMI088_gyroOK ( BMI088_Handle_t * bmi)

Do self test of gyroscope.

Parameters
bmi
Returns
true gyro is OK
false not good

◆ BMI088_gyroSelfTestComplete()

bool BMI088_gyroSelfTestComplete ( BMI088_Handle_t * bmi)

Check the status of the most recent Gyro self test.

Returns
true Self test passed, gyro data is good
false Self test failed, gyro data bad or no test was conduced

◆ BMI088_gyroSelfTestPass()

bool BMI088_gyroSelfTestPass ( BMI088_Handle_t * bmi)

Check the status of the most recent Gyro self test.

Returns
true Self test passed, gyro data is good
false Self test failed, gyro data bad or no test was conduced

◆ BMI088_gyroSelfTestStart()

bool BMI088_gyroSelfTestStart ( BMI088_Handle_t * bmi)

Start the gyro self test.

Returns
true
false

◆ BMI088_init()

bool BMI088_init ( BMI088_Handle_t * bmi)
Parameters
bmi
Returns
true
false

◆ BMI088_initAccel()

bool BMI088_initAccel ( BMI088_Handle_t * bmi)

Setup the accelerometer, must be done 50ms or longer after POR.

Parameters
bmi
Returns
true ACCEL responded sucessfully
false not good

◆ BMI088_readAccel()

bool BMI088_readAccel ( BMI088_Handle_t * bmi)

Blocking function to read the acceleration values form the device.

Parameters
bmi
Returns
true
false

◆ BMI088_readGyro()

bool BMI088_readGyro ( BMI088_Handle_t * bmi)

Blocking function to read the most recent Data Sample from the gyro.

Returns
true Successful data Tx/Rx
false Unsuccessful data Tx/Rx