提交 89182352 编写于 作者: M MurphyZhao

[bsp][stm32] fix RT_ASSERT location error

Signed-off-by: NMurphyZhao <d2014zjt@163.com>
上级 87267b41
......@@ -44,9 +44,8 @@ static struct stm32_adc stm32_adc_obj[sizeof(adc_config) / sizeof(adc_config[0])
static rt_err_t stm32_adc_enabled(struct rt_adc_device *device, rt_uint32_t channel, rt_bool_t enabled)
{
ADC_HandleTypeDef *stm32_adc_handler = device->parent.user_data;
RT_ASSERT(device != RT_NULL);
ADC_HandleTypeDef *stm32_adc_handler = device->parent.user_data;
if (enabled)
{
......@@ -141,11 +140,12 @@ static rt_uint32_t stm32_adc_get_channel(rt_uint32_t channel)
static rt_err_t stm32_get_adc_value(struct rt_adc_device *device, rt_uint32_t channel, rt_uint32_t *value)
{
ADC_ChannelConfTypeDef ADC_ChanConf;
ADC_HandleTypeDef *stm32_adc_handler = device->parent.user_data;
RT_ASSERT(device != RT_NULL);
RT_ASSERT(value != RT_NULL);
ADC_HandleTypeDef *stm32_adc_handler = device->parent.user_data;
rt_memset(&ADC_ChanConf, 0, sizeof(ADC_ChanConf));
#if defined(SOC_SERIES_STM32F1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册