完善一些引脚的控制

This commit is contained in:
起床就犯困 2024-07-13 10:12:30 +08:00
parent db8eb7ca24
commit bbf84a1b33
13 changed files with 12704 additions and 12512 deletions

View File

@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1422158916725793170" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="835033356658112547" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@ -243,7 +243,6 @@ void test(void)
// mppt_constantVoltage();
printf_data();
}

View File

@ -232,6 +232,9 @@ void hardware_Init(void)
RUN_LED_Init();
G_FFMOS_CON_Init();
WDI_INPUT_Init();
BEEP_Init();
POW_OUT_CON_Init();
DSG_PROT_Init();
SPI_Flash_Init();
Set_duty_ratio(0.5);

View File

@ -10,6 +10,7 @@
#include "debug.h"
/* 控制太阳能板导通mos */
/* 低电平mos管导通 */
/* G_FFMOS_CON1 --> PA15 */
#define G_FFMOS_CON1_GPIO GPIOA
#define G_FFMOS_CON1_PIN GPIO_Pin_15
@ -38,6 +39,7 @@ void WDI_INPUT_Init(void);
void BEEP_Init(void);
/* 控制放电引脚 */
/* 低电平关闭 */
/* POW_OUT_CON --> PB8 */
#define POW_OUT_CON_GPIO GPIOB
#define POW_OUT_CON_PIN GPIO_Pin_8

View File

@ -13,14 +13,16 @@ void G_FFMOS_CON_Init(void)
RCC_PB2PeriphClockCmd(RCC_PB2Periph_GPIOA, ENABLE);
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_WriteBit(GPIOA, GPIO_Pin_15, RESET); //关闭mos管打开光伏输入
/* G_FFMOS_CON2 --> PB3 */
RCC_PB2PeriphClockCmd(RCC_PB2Periph_GPIOB, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_WriteBit(GPIOB, GPIO_Pin_3, RESET);
}
void RUN_LED_Init(void)
@ -94,6 +96,7 @@ void EXTI2_IRQHandler(void)
{
if(EXTI_GetITStatus(EXTI_Line2)==SET) { //EXTI_GetITStatus用来获取中断标志位状态如果EXTI线产生中断则返回SET否则返回RESET
printf("Run at EXTI\r\n");
GPIO_WriteBit(DSG_PROT_GPIO, DSG_PROT_PIN, RESET);
EXTI_ClearITPendingBit(EXTI_Line2); //清除中断标志位
}
}

Binary file not shown.

Binary file not shown.

View File

@ -1,88 +1,86 @@
Hardware/src/gpio.o: ../Hardware/src/gpio.c \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Hardware\inc/gpio.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Debug/debug.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Core/core_riscv.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/system_ch32l103.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/ch32l103_conf.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_adc.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_bkp.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_can.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_crc.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_dbgmcu.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_dma.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_exti.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_flash.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_gpio.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_i2c.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_iwdg.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_pwr.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_rcc.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_rtc.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_spi.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_tim.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_usart.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_wwdg.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/ch32l103_it.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_misc.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_lptim.h \
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_opa.h
D:\psx\MPPT\git\Hardware\inc/gpio.h D:\psx\MPPT\git\Debug/debug.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h \
D:\psx\MPPT\git\Core/core_riscv.h D:\psx\MPPT\git\User/system_ch32l103.h \
D:\psx\MPPT\git\User/ch32l103_conf.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_adc.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_bkp.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_can.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_crc.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dbgmcu.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dma.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_exti.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_flash.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_gpio.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_i2c.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_iwdg.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_pwr.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rcc.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rtc.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_spi.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_tim.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_usart.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_wwdg.h \
D:\psx\MPPT\git\User/ch32l103_it.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_misc.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_lptim.h \
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Hardware\inc/gpio.h:
D:\psx\MPPT\git\Hardware\inc/gpio.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Debug/debug.h:
D:\psx\MPPT\git\Debug/debug.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Core/core_riscv.h:
D:\psx\MPPT\git\Core/core_riscv.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/system_ch32l103.h:
D:\psx\MPPT\git\User/system_ch32l103.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/ch32l103_conf.h:
D:\psx\MPPT\git\User/ch32l103_conf.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_adc.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_adc.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_bkp.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_bkp.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_can.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_can.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_crc.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_crc.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_dbgmcu.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dbgmcu.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_dma.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dma.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_exti.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_exti.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_flash.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_flash.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_gpio.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_gpio.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_i2c.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_i2c.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_iwdg.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_iwdg.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_pwr.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_pwr.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_rcc.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rcc.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_rtc.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rtc.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_spi.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_spi.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_tim.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_tim.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_usart.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_usart.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_wwdg.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_wwdg.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/ch32l103_it.h:
D:\psx\MPPT\git\User/ch32l103_it.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_misc.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_misc.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_lptim.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_lptim.h:
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_opa.h:
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h:

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff