Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bbb5cb7

Browse files
committed
chore(wl3): DAC support
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent d98ff1c commit bbb5cb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎libraries/SrcWrapper/src/stm32/analog.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,11 @@ void dac_write_value(PinName pin, uint32_t value, uint8_t do_init)
474474
}
475475

476476
/*##-3- Set DAC Channel1 DHR register ######################################*/
477+
#if defined(DAC_ALIGN_12B_R)
477478
if (HAL_DAC_SetValue(&DacHandle, dacChannel, DAC_ALIGN_12B_R, value) != HAL_OK) {
479+
#else
480+
if (HAL_DAC_SetValue(&DacHandle, dacChannel, DAC_ALIGN_6B_R, value) != HAL_OK) {
481+
#endif
478482
/* Setting value Error */
479483
return;
480484
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /