V2.4
This commit is contained in:
@@ -45,7 +45,7 @@ extern "C" {
|
||||
|
||||
/* CH32V20x Standard Peripheral Library version number */
|
||||
#define __CH32V20x_STDPERIPH_VERSION_MAIN (0x02) /* [15:8] main version */
|
||||
#define __CH32V20x_STDPERIPH_VERSION_SUB (0x03) /* [7:0] sub version */
|
||||
#define __CH32V20x_STDPERIPH_VERSION_SUB (0x04) /* [7:0] sub version */
|
||||
#define __CH32V20x_STDPERIPH_VERSION ( (__CH32V20x_STDPERIPH_VERSION_MAIN << 8)\
|
||||
|(__CH32V20x_STDPERIPH_VERSION_SUB << 0))
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : ch32v20x_adc.h
|
||||
* Author : WCH
|
||||
* Version : V1.0.0
|
||||
* Date : 2021/06/06
|
||||
* Version : V1.0.1
|
||||
* Date : 2026/01/20
|
||||
* Description : This file contains all the functions prototypes for the
|
||||
* ADC firmware library.
|
||||
*********************************************************************************
|
||||
@@ -75,13 +75,6 @@ typedef struct
|
||||
#define ADC_ExternalTrigConv_T1_CC3 ((uint32_t)0x00040000)
|
||||
#define ADC_ExternalTrigConv_None ((uint32_t)0x000E0000)
|
||||
|
||||
#define ADC_ExternalTrigConv_T3_CC1 ((uint32_t)0x00000000)
|
||||
#define ADC_ExternalTrigConv_T2_CC3 ((uint32_t)0x00020000)
|
||||
#define ADC_ExternalTrigConv_T8_CC1 ((uint32_t)0x00060000)
|
||||
#define ADC_ExternalTrigConv_T8_TRGO ((uint32_t)0x00080000)
|
||||
#define ADC_ExternalTrigConv_T5_CC1 ((uint32_t)0x000A0000)
|
||||
#define ADC_ExternalTrigConv_T5_CC3 ((uint32_t)0x000C0000)
|
||||
|
||||
/* ADC_data_align */
|
||||
#define ADC_DataAlign_Right ((uint32_t)0x00000000)
|
||||
#define ADC_DataAlign_Left ((uint32_t)0x00000800)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : ch32v20x_dbgmcu.c
|
||||
* Author : WCH
|
||||
* Version : V1.0.0
|
||||
* Date : 2021/06/06
|
||||
* Version : V1.0.1
|
||||
* Date : 2026/06/18
|
||||
* Description : This file provides all the DBGMCU firmware functions.
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
@@ -115,6 +115,7 @@ void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState)
|
||||
* CH32V203F6P-0x203705x0-0x203905x0
|
||||
* CH32V203F8P-0x203A05x0
|
||||
* CH32V203RBT-0x203405xC
|
||||
* CH32V203K8U-0x203215x0
|
||||
* CH32V208WBU-0x208005xC
|
||||
* CH32V208RBT-0x208105xC
|
||||
* CH32V208CBU-0x208205xC
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : ch32v20x_flash.c
|
||||
* Author : WCH
|
||||
* Version : V1.0.1
|
||||
* Date : 2025/01/09
|
||||
* Version : V1.0.2
|
||||
* Date : 2026/08/06
|
||||
* Description : This file provides all the FLASH firmware functions.
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
@@ -56,8 +56,8 @@
|
||||
#define EEPROM_ADDRESS ((uint32_t)0x8070000)
|
||||
|
||||
/* Delay definition */
|
||||
#define EraseTimeout ((uint32_t)0x00130000)
|
||||
#define ProgramTimeout ((uint32_t)0x00005000)
|
||||
#define EraseTimeout ((uint32_t)0x10000000)
|
||||
#define ProgramTimeout ((uint32_t)0x10000000)
|
||||
|
||||
/* Flash Program Valid Address */
|
||||
#define ValidAddrStart (FLASH_BASE)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* File Name : ch32v20x_gpio.c
|
||||
* Author : WCH
|
||||
* Version : V1.0.1
|
||||
* Date : 2025/04/26
|
||||
* Date : 2025/06/18
|
||||
* Description : This file provides all the GPIO firmware functions.
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
@@ -849,6 +849,30 @@ void GPIO_IPD_Unused(void)
|
||||
GPIO_Init(GPIOD, &GPIO_InitStructure);
|
||||
break;
|
||||
}
|
||||
case 0x20321500: //CH32V203K8U
|
||||
{
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11\
|
||||
|GPIO_Pin_12|GPIO_Pin_13\
|
||||
|GPIO_Pin_14;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1\
|
||||
|GPIO_Pin_2|GPIO_Pin_3\
|
||||
|GPIO_Pin_4|GPIO_Pin_5\
|
||||
|GPIO_Pin_6|GPIO_Pin_7\
|
||||
|GPIO_Pin_8|GPIO_Pin_9\
|
||||
|GPIO_Pin_10|GPIO_Pin_11\
|
||||
|GPIO_Pin_12|GPIO_Pin_13\
|
||||
|GPIO_Pin_14|GPIO_Pin_15;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
||||
GPIO_Init(GPIOC, &GPIO_InitStructure);
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2|GPIO_Pin_3\
|
||||
|GPIO_Pin_4|GPIO_Pin_5\
|
||||
|GPIO_Pin_6;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
||||
GPIO_Init(GPIOD, &GPIO_InitStructure);
|
||||
break;
|
||||
}
|
||||
case 0x20330500: //CH32V203C6T
|
||||
{
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1\
|
||||
|
||||
Reference in New Issue
Block a user