Skip to content
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
5 changes: 5 additions & 0 deletions drivers/imu/bmi270/bmi270.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,13 @@ static void bmi270_gpio_callback(const struct device *dev, struct gpio_callback
static int bmi270_low_power_reset(const struct device *dev)
{
const struct bmi270_config *config = dev->config;
struct bmi270_data *data = dev->data;
uint8_t reg_val;
int rc;

(void)gpio_pin_interrupt_configure_dt(&config->int1_gpio, GPIO_INT_DISABLE);
(void)gpio_pin_configure_dt(&config->int1_gpio, GPIO_DISCONNECTED);
(void)k_sem_take(&data->int1_sem, K_NO_WAIT);

reg_val = 0x00;
rc = bmi270_reg_read(dev, BMI270_REG_PWR_CTRL, &reg_val, 1);
Expand Down Expand Up @@ -571,6 +573,9 @@ int bmi270_data_read(const struct device *dev, struct imu_sample_array *samples,
buffer_offset += 6;
}
}
if (data_frames == 0) {
return -ENODATA;
}
if (interrupt_frame == 0) {
interrupt_frame = data_frames;
}
Expand Down
5 changes: 5 additions & 0 deletions drivers/imu/lsm6dsv/lsm6dsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ static inline int lsm6dsv_reg_write(const struct device *dev, uint8_t reg, const
static int lsm6dsv_low_power_reset(const struct device *dev)
{
const struct lsm6dsv_config *cfg = dev->config;
struct lsm6dsv_data *data = dev->data;
uint8_t reg_val;
int rc;

(void)gpio_pin_interrupt_configure_dt(&cfg->int1_gpio, GPIO_INT_DISABLE);
(void)gpio_pin_configure_dt(&cfg->int1_gpio, GPIO_DISCONNECTED);
(void)k_sem_take(&data->int1_sem, K_NO_WAIT);

/* Soft-reset the device */
reg_val = LSM6DSV_FUNC_CFG_ACCESS_SW_POR;
Expand Down Expand Up @@ -468,6 +470,9 @@ int lsm6dsv_data_read(const struct device *dev, struct imu_sample_array *samples
}
sample++;
}
if (data_frames == 0) {
return -ENODATA;
}
if (interrupt_frame == 0) {
interrupt_frame = data_frames;
}
Expand Down
2 changes: 1 addition & 1 deletion dts/bindings/epacket/embeint,epacket_bt_adv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ properties:
max-packet-size:
default: 113
header-size:
default: 22
default: 23
footer-size:
default: 16
Loading