File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
bsp/Infineon/libraries/HAL_Drivers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ static rt_err_t ifx_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe
5353 if (enabled )
5454 {
5555 /* Initialize ADC. The ADC block which can connect to pin 10[0] is selected */
56- result = cyhal_adc_init (& adc_obj , VPLUS_CHANNEL_0 , NULL );
56+ result = cyhal_adc_init (& adc_obj , channel , NULL );
5757
5858 if (result != RT_EOK )
5959 {
@@ -62,7 +62,7 @@ static rt_err_t ifx_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe
6262 }
6363
6464 /* Initialize a channel 0 and configure it to scan P10_0 in single ended mode. */
65- result = cyhal_adc_channel_init_diff (adc_ch , & adc_obj , VPLUS_CHANNEL_0 ,
65+ result = cyhal_adc_channel_init_diff (adc_ch , & adc_obj , channel ,
6666 CYHAL_ADC_VNEG , & channel_config );
6767
6868 if (result != RT_EOK )
@@ -82,8 +82,8 @@ static rt_err_t ifx_adc_enabled(struct rt_adc_device *device, rt_uint32_t channe
8282 }
8383 else
8484 {
85- cyhal_adc_free (& adc_obj );
8685 cyhal_adc_channel_free (adc_ch );
86+ cyhal_adc_free (& adc_obj );
8787 }
8888
8989 return RT_EOK ;
You can’t perform that action at this time.
0 commit comments