@@ -81,15 +81,15 @@ static rt_uint32_t stm32_dac_get_channel(rt_uint32_t channel)
8181static rt_err_t stm32_set_dac_value (struct rt_dac_device * device , rt_uint32_t channel , rt_uint32_t * value )
8282{
8383 uint32_t dac_channel ;
84- DAC_ChannelConfTypeDef dac_ChanConf ;
84+ DAC_ChannelConfTypeDef DAC_ChanConf ;
8585 DAC_HandleTypeDef * stm32_dac_handler ;
8686
8787 RT_ASSERT (device != RT_NULL );
8888 RT_ASSERT (value != RT_NULL );
8989
9090 stm32_dac_handler = device -> parent .user_data ;
9191
92- rt_memset (& dac_ChanConf , 0 , sizeof (dac_ChanConf ));
92+ rt_memset (& DAC_ChanConf , 0 , sizeof (DAC_ChanConf ));
9393
9494#if defined(SOC_SERIES_STM32MP1 )
9595 if (channel <= 2 && channel > 0 )
@@ -105,11 +105,11 @@ static rt_err_t stm32_set_dac_value(struct rt_dac_device *device, rt_uint32_t ch
105105#endif
106106
107107#if defined(SOC_SERIES_STM32MP1 )
108- dac_ChanConf .DAC_Trigger = DAC_TRIGGER_NONE ;
109- dac_ChanConf .DAC_OutputBuffer = DAC_OUTPUTBUFFER_DISABLE ;
108+ DAC_ChanConf .DAC_Trigger = DAC_TRIGGER_NONE ;
109+ DAC_ChanConf .DAC_OutputBuffer = DAC_OUTPUTBUFFER_DISABLE ;
110110#endif
111111 /* config dac out channel*/
112- if (HAL_DAC_ConfigChannel (stm32_dac_handler , & dac_ChanConf , dac_channel ) != HAL_OK )
112+ if (HAL_DAC_ConfigChannel (stm32_dac_handler , & DAC_ChanConf , dac_channel ) != HAL_OK )
113113 {
114114 LOG_D ("Config dac out channel Error!\n" );
115115 return - RT_ERROR ;
0 commit comments