Skip to content

Commit

Permalink
ism303dac: fixed _xl_act_sleep_dur_set #90
Browse files Browse the repository at this point in the history
  • Loading branch information
albezanc committed Oct 1, 2020
1 parent 551355b commit f1ebd1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ism303dac_STdC/driver/ism303dac_reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2580,12 +2580,12 @@ int32_t ism303dac_xl_act_sleep_dur_set(stmdev_ctx_t *ctx, uint8_t val)
ism303dac_wake_up_dur_a_t wake_up_dur_a;
int32_t ret;

ret = ism303dac_read_reg(ctx, ISM303DAC_WAKE_UP_THS_A,
ret = ism303dac_read_reg(ctx, ISM303DAC_WAKE_UP_DUR_A,
(uint8_t*)&wake_up_dur_a, 1);
if(ret == 0){

wake_up_dur_a.sleep_dur = val;
ret = ism303dac_write_reg(ctx, ISM303DAC_WAKE_UP_THS_A,
ret = ism303dac_write_reg(ctx, ISM303DAC_WAKE_UP_DUR_A,
(uint8_t*)&wake_up_dur_a, 1);
}
return ret;
Expand Down

0 comments on commit f1ebd1d

Please sign in to comment.