Skip to content

Commit

Permalink
Updated to v1.6.0. Added BHI380 support. Added Head Orientation support.
Browse files Browse the repository at this point in the history
  • Loading branch information
kegov committed May 11, 2023
1 parent 64710af commit 8d22a1a
Show file tree
Hide file tree
Showing 77 changed files with 153,362 additions and 22,439 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# BHI260AB/BHA260AB/BHI260AP/BHI360 Sensor API
# BHI260AB/BHA260AB/BHI260AP/BHI360/BHI380 SensorAPI

> This package contains BHI260AB/BHA260AB/BHI260AP/BHI360 generically clustered as BHy2 sensor API
This package contains BHI260AB/BHA260AB/BHI260AP/BHI360/BHI380 generically clustered as BHy2 SensorAPI

This package can be used together with [COINES](https://www.bosch-sensortec.com/software-tools/tools/coines/) to modify, compile and run the sample applications.

Product links

- [BHA260AB](https://www.bosch-sensortec.com/products/smart-sensors/bha260ab.html)

- [BHI260AB](https://www.bosch-sensortec.com/products/smart-sensors/bhi260ab.html)

- [BHI260AP](https://www.bosch-sensortec.com/products/smart-sensors/bhi260ap/)

- [BHI360](https://www.bosch-sensortec.com/products/smart-sensor-systems/bhi360/)

- [BHI380](https://www.bosch-sensortec.com/products/smart-sensor-systems/bhi380/)

> If you are interested in the BHI380 smart sensor, please use our [contact form](https://www.bosch-sensortec.com/products/smart-sensor-systems/bhi380/#contact)
> *Please be aware that the BHI380 is currently only available to a limited number of projects. Therefore, we are only considering information requests for projects with a minimum lifetime quantity of 1,00,000 units and above.*


---
#### Copyright (C) 2022 Bosch Sensortec GmbH. All rights reserved

#### Copyright (C) 2023 Bosch Sensortec GmbH. All rights reserved
6 changes: 3 additions & 3 deletions bhi3.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhi3.c
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

Expand Down
10 changes: 5 additions & 5 deletions bhi3.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,15 +31,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhi3.h
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

#ifndef __BHI3_H__
#define __BHI3_H__

/* Start of CPP guard */
/* Start of CPP Guard */
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus */
Expand Down Expand Up @@ -322,7 +322,7 @@ int8_t bhi3_set_wrist_gesture_detect_config(const uint8_t *wgd_cnfg, struct bhy2
*/
int8_t bhi3_get_wrist_gesture_detect_config(uint8_t *wgd_cnfg, struct bhy2_dev *dev);

/* End of CPP guard */
/* End of CPP Guard */
#ifdef __cplusplus
}
#endif /*__cplusplus */
Expand Down
31 changes: 21 additions & 10 deletions bhi3_defs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,15 +31,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhi3_defs.h
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

#ifndef __BHI3_DEFS_H__
#define __BHI3_DEFS_H__

/* Start of CPP guard */
/* Start of CPP Guard */
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus */
Expand Down Expand Up @@ -102,6 +102,7 @@ extern "C" {

#define BHI3_PHY_GYRO_LOW_POWER_MODE_CTRL_CODE UINT8_C(0x05)
#define BHI3_PHY_GYRO_NORMAL_POWER_MODE UINT8_C(0x00)
#define BHI3_PHY_GYRO_PERFORMANCE_POWER_MODE UINT8_C(0x01)
#define BHI3_PHY_GYRO_LOW_POWER_MODE UINT8_C(0x02)
#define BHI3_PHY_GYRO_LOW_POWER_MODE_CTRL_LEN 1

Expand Down Expand Up @@ -172,16 +173,26 @@ static const char * const bhi3_wrist_gesture_detect_output[] = {
[FLICK_OUT] = "FLICK_OUT"
}; /*lint -e528 */

enum bhi3_phy_sensor_power_mode {
NORMAL,
LOW_POWER = 0x02
enum bhi3_phy_sensor_acc_power_mode {
ACC_NORMAL,
ACC_LOW_POWER = 0x02
};

static const char * const bhi3_phy_sensor_pwm_output[] = {
[NORMAL] = "NORMAL", [LOW_POWER] = "LOW POWER"
enum bhi3_phy_sensor_gyro_power_mode {
GYRO_NORMAL,
GYRO_PERFORMANCE,
GYRO_LOW_POWER
};

static const char * const bhi3_phy_sensor_acc_pwm_output[] = {
[ACC_NORMAL] = "NORMAL", [ACC_LOW_POWER] = "LOW POWER"
}; /*lint -e528 */

static const char * const bhi3_phy_sensor_gyro_pwm_output[] = {
[GYRO_NORMAL] = "NORMAL", [GYRO_PERFORMANCE] = "PERFORMANCE", [GYRO_LOW_POWER] = "LOW POWER"
}; /*lint -e528 */

/* End of CPP guard */
/* End of CPP Guard */
#ifdef __cplusplus
}
#endif /*__cplusplus */
Expand Down
6 changes: 3 additions & 3 deletions bhi3_multi_tap.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhi3_multi_tap.c
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

Expand Down
10 changes: 5 additions & 5 deletions bhi3_multi_tap.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,15 +31,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhi3_multi_tap.h
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

#ifndef _BHY2_MULTI_TAP_H_
#define _BHY2_MULTI_TAP_H_

/* Start of CPP guard */
/* Start of CPP Guard */
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus */
Expand Down Expand Up @@ -103,7 +103,7 @@ int8_t bhi3_multi_tap_detector_set_config(const void *buffer, struct bhy2_dev *d
*/
int8_t bhi3_multi_tap_detector_get_config(const void *buffer, struct bhy2_dev *dev);

/* End of CPP guard */
/* End of CPP Guard */
#ifdef __cplusplus
}
#endif /*__cplusplus */
Expand Down
16 changes: 8 additions & 8 deletions bhi3_multi_tap_defs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,18 +31,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhi3_multi_tap_defs.h
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

#ifndef _BHI3_MULTI_TAP_DEFS_H_
#define _BHI3_MULTI_TAP_DEFS_H_

/* Start of CPP guard */
/* Start of CPP Guard */
#ifdef __cplusplus
extern "C" {
#endif
#endif /*__cplusplus */

#include <stdint.h>
#include <string.h>
Expand Down Expand Up @@ -74,7 +74,7 @@ extern "C" {

#define BHI3_SINGLE_TAP_AXIS_SEL_MASK 0x03
#define BHI3_SINGLE_TAP_WAIT_TIMEOUT_MASK 0x04
#define BHI3_SINGLE_TAP_MAX_PEAKS_FOR_TAP_MASK 0x3C
#define BHI3_SINGLE_TAP_MAX_PEAKS_FOR_TAP_MASK 0x38
#define BHI3_SINGLE_TAP_FILTER_MODE_MASK 0xC0

#define BHI3_DOUBLE_TAP_TAP_PEAK_DUR_MASK 0x03FF
Expand Down Expand Up @@ -181,9 +181,9 @@ static const char * const bhi3_multi_tap_string_out[] = {
[TRIPLE_DOUBLE_TAP] = "TRIPLE_DOUBLE_TAP", [TRIPLE_DOUBLE_SINGLE_TAP] = "TRIPLE_DOUBLE_SINGLE_TAP"
}; /*lint -e528 */

/* End of CPP guard */
/* End of CPP Guard */
#ifdef __cplusplus
}
#endif
#endif /*__cplusplus */

#endif /* _BHI3_MULTI_TAP_DEFS_H_ */
6 changes: 3 additions & 3 deletions bhy2.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhy2.c
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

Expand Down
10 changes: 5 additions & 5 deletions bhy2.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,15 +31,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhy2.h
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

#ifndef __BHY2_H__
#define __BHY2_H__

/* Start of CPP guard */
/* Start of CPP Guard */
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus */
Expand Down Expand Up @@ -656,7 +656,7 @@ int8_t bhy2_read_status(uint16_t *status_code,
uint32_t *actual_len,
struct bhy2_dev *dev);

/* End of CPP guard */
/* End of CPP Guard */
#ifdef __cplusplus
}
#endif /*__cplusplus */
Expand Down
6 changes: 3 additions & 3 deletions bhy2_bsec.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhy2_bsec.c
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

Expand Down
10 changes: 5 additions & 5 deletions bhy2_bsec.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,15 +31,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhy2_bsec.h
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

#ifndef _BHY2_BSEC_H_
#define _BHY2_BSEC_H_

/* Start of CPP guard */
/* Start of CPP Guard */
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus */
Expand All @@ -66,7 +66,7 @@ struct bhy2_bsec_air_quality

void bhy2_bsec_parse_air_quality(const uint8_t *payload, struct bhy2_bsec_air_quality *data);

/* End of CPP guard */
/* End of CPP Guard */
#ifdef __cplusplus
}
#endif /*__cplusplus */
Expand Down
10 changes: 5 additions & 5 deletions bhy2_defs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
* Copyright (c) 2023 Bosch Sensortec GmbH. All rights reserved.
*
* BSD-3-Clause
*
Expand Down Expand Up @@ -31,15 +31,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bhy2_defs.h
* @date 2023-02-10
* @version v1.5.0
* @date 2023-03-24
* @version v1.6.0
*
*/

#ifndef __BHY2_DEFS_H__
#define __BHY2_DEFS_H__

/* Start of CPP guard */
/* Start of CPP Guard */
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus */
Expand Down Expand Up @@ -801,7 +801,7 @@ enum bhy2_data_inj_mode {

#define BHY2_BYTE_TO_NIBBLE(X) (((uint8_t)(X)[0] & 0x0F) | (((uint8_t)(X)[1] << 4) & 0xF0))

/* End of CPP guard */
/* End of CPP Guard */
#ifdef __cplusplus
}
#endif /*__cplusplus */
Expand Down
Loading

0 comments on commit 8d22a1a

Please sign in to comment.