[bsp][stm32][drv_adc.c]: change the bsp name of 100ask to be consistent with other bsp and commit a bug for drv_adc,c (#6068)

* [bsp][stm32][drv_adc.c]: change the bsp name of 100ask to be consistent with other bsp and commit a bug for drv_adc,c (#6068)
This commit is contained in:
100ask-Alen 2022-06-14 14:17:22 +08:00 committed by GitHub
parent 53ed031498
commit 3d06d96f65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 9 additions and 5 deletions

View File

@ -91,8 +91,8 @@ jobs:
- {RTT_BSP: "sam7x", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f072-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f091-st-nucleo", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f103_100ask_mini", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f103_100ask_pro", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f103-100ask-mini", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f103-100ask-pro", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f103-atk-nano", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f103-atk-warshipv3", RTT_TOOL_CHAIN: "sourcery-arm"}
- {RTT_BSP: "stm32/stm32f103-blue-pill", RTT_TOOL_CHAIN: "sourcery-arm"}

View File

@ -9,6 +9,8 @@ STM32 系列 BSP 目前支持情况如下表所示:
| [stm32f072-st-nucleo](stm32f072-st-nucleo) | ST 官方 STM32F072-nucleo 开发板 |
| [stm32f091-st-nucleo](stm32f091-st-nucleo) | ST 官方 STM32F091-nucleo 开发板 |
| **F1 系列** | |
| [stm32f103-100ask-mini](stm32f103-100ask-mini) | 百问网F103 Mini开发板 |
| [stm32f103-100ask-pro](stm32f103-100ask-pro) | 百问网F103 Pro开发板 |
| [stm32f103-atk-nano](stm32f103-atk-nano) | 正点原子 F103 NANO 开发板 |
| [stm32f103-atk-warshipv3](stm32f103-atk-warshipv3) | 正点原子 F103 战舰V3 开发板 |
| [stm32f103-blue-pill](stm32f103-blue-pill) | STM32F103C8T6蓝色最小系统板 |

View File

@ -73,12 +73,13 @@ static rt_err_t stm32_adc_enabled(struct rt_adc_device *device, rt_uint32_t chan
static rt_uint8_t stm32_adc_get_resolution(struct rt_adc_device *device)
{
ADC_HandleTypeDef *stm32_adc_handler;
#if defined(SOC_SERIES_STM32F1) || defined(SOC_SERIES_STM32F3)
return 12;
#else
ADC_HandleTypeDef *stm32_adc_handler = device->parent.user_data;
RT_ASSERT(device != RT_NULL);
stm32_adc_handler = device->parent.user_data;
switch(stm32_adc_handler->Init.Resolution)
{
case ADC_RESOLUTION_12B:
@ -92,6 +93,7 @@ static rt_uint8_t stm32_adc_get_resolution(struct rt_adc_device *device)
default:
return 0;
}
#endif /* defined(SOC_SERIES_STM32F1) || defined(SOC_SERIES_STM32F3) */
}
static rt_uint32_t stm32_adc_get_channel(rt_uint32_t channel)

View File

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 237 KiB

View File

Before

Width:  |  Height:  |  Size: 747 KiB

After

Width:  |  Height:  |  Size: 747 KiB