Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v4.2.0 #4

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions bma5.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bma5.c
* @date 2024-04-15
* @version v4.1.0
* @date 2024-07-29
* @version v4.2.0
*
*/

Expand Down Expand Up @@ -513,8 +513,6 @@ int8_t bma5_get_temp_conf(struct bma5_temp_conf *config, struct bma5_dev *dev)
config->temp_rate = BMA5_GET_BITS_POS_0(reg_value, BMA5_TEMP_RATE);
config->temp_meas_src = BMA5_GET_BITS(reg_value, BMA5_TEMP_MEAS_SRC);
config->temp_ext_sel = BMA5_GET_BITS(reg_value, BMA5_TEMP_EXT_SEL);
config->temp_tcs = BMA5_GET_BITS(reg_value, BMA5_TEMP_TCS);
config->temp_tco = BMA5_GET_BITS(reg_value, BMA5_TEMP_TCO);
}
}

Expand All @@ -539,8 +537,6 @@ int8_t bma5_set_temp_conf(const struct bma5_temp_conf *config, struct bma5_dev *
reg_value = BMA5_SET_BITS_POS_0(reg_value, BMA5_TEMP_RATE, config->temp_rate);
reg_value = BMA5_SET_BITS(reg_value, BMA5_TEMP_MEAS_SRC, config->temp_meas_src);
reg_value = BMA5_SET_BITS(reg_value, BMA5_TEMP_EXT_SEL, config->temp_ext_sel);
reg_value = BMA5_SET_BITS(reg_value, BMA5_TEMP_TCS, config->temp_tcs);
reg_value = BMA5_SET_BITS(reg_value, BMA5_TEMP_TCO, config->temp_tco);

result = bma5_set_regs(BMA5_REG_TEMP_CONF, (const uint8_t *)&reg_value, sizeof(reg_value), dev);
}
Expand Down Expand Up @@ -1279,22 +1275,23 @@ int8_t bma5_get_acc_doff(struct bma5_accel_doff *accel_doff, struct bma5_dev *de
else
{
result = bma5_get_regs(BMA5_REG_ACC_OFFSET_0, reg_value, 6, dev);

if (BMA5_OK == result)
{
acc_doff_7_0 = BMA5_GET_BITS_POS_0(reg_value[0], BMA5_ACC_DOFF_7_0);
acc_doff_8 = BMA5_GET_BITS_POS_0(reg_value[1], BMA5_ACC_DOFF_8);

accel_doff->x_doff = (int16_t)(((uint16_t)acc_doff_8 << 8) | ((uint16_t)acc_doff_7_0));
accel_doff->x_doff = (int16_t)((((uint16_t)acc_doff_8 << 8) | ((uint16_t)acc_doff_7_0)) << 7) >> 7;

acc_doff_7_0 = BMA5_GET_BITS_POS_0(reg_value[2], BMA5_ACC_DOFF_7_0);
acc_doff_8 = BMA5_GET_BITS_POS_0(reg_value[3], BMA5_ACC_DOFF_8);

accel_doff->y_doff = (int16_t)(((uint16_t)acc_doff_8 << 8) | ((uint16_t)acc_doff_7_0));
accel_doff->y_doff = (int16_t)((((uint16_t)acc_doff_8 << 8) | ((uint16_t)acc_doff_7_0)) << 7) >> 7;

acc_doff_7_0 = BMA5_GET_BITS_POS_0(reg_value[4], BMA5_ACC_DOFF_7_0);
acc_doff_8 = BMA5_GET_BITS_POS_0(reg_value[5], BMA5_ACC_DOFF_8);

accel_doff->z_doff = (int16_t)(((uint16_t)acc_doff_8 << 8) | ((uint16_t)acc_doff_7_0));
accel_doff->z_doff = (int16_t)((((uint16_t)acc_doff_8 << 8) | ((uint16_t)acc_doff_7_0)) << 7) >> 7;
}
}

Expand Down
4 changes: 2 additions & 2 deletions bma5.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bma5.h
* @date 2024-04-15
* @version v4.1.0
* @date 2024-07-29
* @version v4.2.0
*
*/

Expand Down
4 changes: 2 additions & 2 deletions bma580.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bma580.c
* @date 2024-04-15
* @version v4.1.0
* @date 2024-07-29
* @version v4.2.0
*
*/

Expand Down
4 changes: 2 additions & 2 deletions bma580.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bma580.h
* @date 2024-04-15
* @version v4.1.0
* @date 2024-07-29
* @version v4.2.0
*
*/

Expand Down
4 changes: 2 additions & 2 deletions bma580_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bma580_context.h
* @date 2024-04-15
* @version v4.1.0
* @date 2024-07-29
* @version v4.2.0
*
*/

Expand Down
4 changes: 2 additions & 2 deletions bma580_features.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bma580_features.c
* @date 2024-04-15
* @version v4.1.0
* @date 2024-07-29
* @version v4.2.0
*
*/

Expand Down
4 changes: 2 additions & 2 deletions bma580_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bma580_features.h
* @date 2024-04-15
* @version v4.1.0
* @date 2024-07-29
* @version v4.2.0
*
*/

Expand Down
26 changes: 2 additions & 24 deletions bma5_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @file bma5_defs.h
* @date 2024-04-15
* @version v4.1.0
* @date 2024-07-29
* @version v4.2.0
*
*/

Expand Down Expand Up @@ -421,14 +421,6 @@
#define BMA5_TEMP_EXT_SEL_MSK UINT8_C(0x10)
#define BMA5_TEMP_EXT_SEL_POS UINT8_C(0x04)

/*! Enable temperature dependent sensitivity correction. */
#define BMA5_TEMP_TCS_MSK UINT8_C(0x20)
#define BMA5_TEMP_TCS_POS UINT8_C(0x05)

/*! Enable temperature dependent offset correction. */
#define BMA5_TEMP_TCO_MSK UINT8_C(0x40)
#define BMA5_TEMP_TCO_POS UINT8_C(0x06)

/*! Output enable for INT pin */
#define BMA5_INT_MODE_MSK UINT8_C(0x03)
#define BMA5_INT_MODE_POS UINT8_C(0x00)
Expand Down Expand Up @@ -748,14 +740,6 @@
#define BMA5_TEMP_EXT_SEL_INT1 UINT8_C(0x00) /*! interrupt pin INT1 */
#define BMA5_TEMP_EXT_SEL_INT2 UINT8_C(0x01) /*! interrupt pin INT2 */

/* Macros to define the supported temp_tcs values */
#define BMA5_TEMP_TCS_DISABLE UINT8_C(0x00) /*! TCS correction disabled */
#define BMA5_TEMP_TCS_ENABLE UINT8_C(0x01) /*! TCS correction enabled */

/* Macros to define the supported temp_tco values */
#define BMA5_TEMP_TCO_DISABLE UINT8_C(0x00) /*! TCO correction disabled */
#define BMA5_TEMP_TCO_ENABLE UINT8_C(0x01) /*! TCO correction enabled */

/* Macros to define the supported int1_mode values */
#define BMA5_INT1_MODE_OFF UINT8_C(0x00) /*! Output disabled. */
#define BMA5_INT1_MODE_LATCHED UINT8_C(0x01) /*! Latched (level triggered) interrupts. */
Expand Down Expand Up @@ -1157,12 +1141,6 @@ struct bma5_temp_conf
/*! Select the external pin as source for temperature ADC. */
uint8_t temp_ext_sel;

/*! Enable temperature dependent sensitivity correction. */
uint8_t temp_tcs;

/*! Enable temperature dependent offset correction. */
uint8_t temp_tco;

};

/*!
Expand Down
2 changes: 1 addition & 1 deletion examples/accel_foc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ $(COMMON_LOCATION)/common/common.c
INCLUDEPATHS += \
$(API_LOCATION) \
$(COMMON_LOCATION)/common

COINES_BACKEND ?= COINES_BRIDGE
include $(COINES_INSTALL_PATH)/coines.mk
Loading