Skip to content

Commit

Permalink
v0.3.2.0
Browse files Browse the repository at this point in the history
v0.3.2.0

Co-Authored-By: Markus Lochmann <100404916+ma-loc@users.noreply.github.com>
Co-Authored-By: Yong Shen <47750708+yongbosch@users.noreply.github.com>
  • Loading branch information
3 people committed Jul 7, 2023
1 parent b0f581c commit 3d43515
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 65 deletions.
42 changes: 0 additions & 42 deletions smi230/Makefile

This file was deleted.

29 changes: 15 additions & 14 deletions smi230/hal/sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

#include "sensors_poll_context.h"

#define VERSION_MAJOR (0)
#define VERSION_MINOR (3)

/*****************************************************************************/
static const struct sensor_t *sSensorList = NULL;
Expand Down Expand Up @@ -234,21 +236,20 @@ static struct hw_module_methods_t sensors_module_methods =
};

struct sensors_module_t HAL_MODULE_INFO_SYM =
{
.common = {
.tag = HARDWARE_MODULE_TAG,
.version_major = 1,
.version_minor = 0,
.id = SENSORS_HARDWARE_MODULE_ID,
.name = "Bosch Sensor module",
.author = "Robert Bosch,GmbH",
.methods = &sensors_module_methods,
.dso = NULL,
.reserved = {0}
},
.get_sensors_list = sensors__get_sensors_list,
{
.common = {
.tag = HARDWARE_MODULE_TAG,
.module_api_version = (VERSION_MAJOR << 8) | VERSION_MINOR,
.hal_api_version = 0,
.id = SENSORS_HARDWARE_MODULE_ID,
.name = "Bosch Sensor module",
.author = "Robert Bosch,GmbH",
.methods = &sensors_module_methods,
.dso = NULL,
.reserved = {0}},
.get_sensors_list = sensors__get_sensors_list,
#if defined(SENSORS_DEVICE_API_VERSION_1_4)
.set_operation_mode = sensors__set_operation_mode,
.set_operation_mode = sensors__set_operation_mode,
#endif
};

Expand Down
2 changes: 1 addition & 1 deletion smi230/sensord/sensord_hwcntl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* 2nd byte minor version of HAL
* 3nd byte bug fix version of HAL
*/
uint8_t HAL_ver[4] = { 0, 3, 0, 0 };
uint8_t HAL_ver[4] = { 0, 3, 2, 0 };

#define UNUSED_SENSOR_T(sensor_name) \
{ .name = sensor_name,\
Expand Down
11 changes: 3 additions & 8 deletions smi230/sensord/sensord_hwcntl_implement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ EV_FF_STATUS 0x17 EV_MAX 0x1f EV_CNT (EV_MAX+1)
#define SMI230_GYRO_RANGE_1000DPS 1000
#define SMI230_GYRO_RANGE_2000DPS 2000

#define SMI230_GYRO_BYTES_PER_FIFO_SAMPLE 6
#define SMI230_GYRO_MAX_FIFO_BYTE 100
#define SMI230_GYRO_MAX_FIFO_FRAME (SMI230_GYRO_MAX_FIFO_BYTE / SMI230_GYRO_BYTES_PER_FIFO_SAMPLE)
#define SMI230_GYRO_MAX_FIFO_FRAME 100

#define BMA2X2_RANGE_2G 3
#define BMA2X2_RANGE_4G 5
Expand Down Expand Up @@ -826,7 +824,6 @@ static void ap_config_phyGYR(bsx_f32_t sample_rate, uint16_t fifo_data_len)
int32_t odr_Hz;
int32_t bandwidth = 0;
int32_t fifo_data_sel_regval;
int32_t fifo_data_len_in_bytes;
float physical_Hz = 0;

PINFO("set physical GYRO rate %f", sample_rate);
Expand Down Expand Up @@ -924,10 +921,8 @@ static void ap_config_phyGYR(bsx_f32_t sample_rate, uint16_t fifo_data_len)
if (fifo_data_len < 1)
fifo_data_len = 1;

fifo_data_len_in_bytes = SMI230_GYRO_BYTES_PER_FIFO_SAMPLE * fifo_data_len;

PINFO("write gyro wm as %d samples, in %d bytes", fifo_data_len, fifo_data_len_in_bytes);
ret = wr_sysfs_oneint("fifo_wm", gyr_input_dir_name, fifo_data_len_in_bytes);
PINFO("write gyro wm as %d", fifo_data_len);
ret = wr_sysfs_oneint("fifo_wm", gyr_input_dir_name, fifo_data_len);
#endif
}

Expand Down

0 comments on commit 3d43515

Please sign in to comment.