mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Feedback.
This commit is contained in:
parent
3793e90790
commit
2f307b8b65
@ -166,12 +166,12 @@ static inline void dac_ll_cw_set_dc_offset(dac_channel_t channel, int8_t offset)
|
||||
if (SENS.sar_dac_ctrl2.dac_inv1 == DAC_CW_PHASE_180) {
|
||||
offset = 0 - offset;
|
||||
}
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(SENS.sar_dac_ctrl2, dac_dc1, -128 - offset);
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(SENS.sar_dac_ctrl2, dac_dc1, offset);
|
||||
} else if (channel == DAC_CHANNEL_2) {
|
||||
if (SENS.sar_dac_ctrl2.dac_inv2 == DAC_CW_PHASE_180) {
|
||||
offset = 0 - offset;
|
||||
}
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(SENS.sar_dac_ctrl2, dac_dc2, -128 - offset);
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(SENS.sar_dac_ctrl2, dac_dc2, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user