update:
1.变更了引脚,并且添加了一个继电器使用PD7为报警灯
This commit is contained in:
@@ -58,6 +58,10 @@ void Error_Handler(void);
|
||||
/* USER CODE END EFP */
|
||||
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define W55001_RST_Pin GPIO_PIN_2
|
||||
#define W55001_RST_GPIO_Port GPIOC
|
||||
#define W55001_INT_Pin GPIO_PIN_3
|
||||
#define W55001_INT_GPIO_Port GPIOC
|
||||
#define W5500_RST_Pin GPIO_PIN_4
|
||||
#define W5500_RST_GPIO_Port GPIOC
|
||||
#define W5500_INT_Pin GPIO_PIN_5
|
||||
@@ -88,12 +92,12 @@ void Error_Handler(void);
|
||||
#define DS1302_DIO_GPIO_Port GPIOD
|
||||
#define DS1302_RST_Pin GPIO_PIN_5
|
||||
#define DS1302_RST_GPIO_Port GPIOD
|
||||
#define BUZZER_Pin GPIO_PIN_4
|
||||
#define ALARM_LED_Pin GPIO_PIN_7
|
||||
#define ALARM_LED_GPIO_Port GPIOD
|
||||
#define BUZZER_Pin GPIO_PIN_8
|
||||
#define BUZZER_GPIO_Port GPIOB
|
||||
#define RELAY_4_Pin GPIO_PIN_5
|
||||
#define RELAY_4_Pin GPIO_PIN_9
|
||||
#define RELAY_4_GPIO_Port GPIOB
|
||||
#define RS485_EN_Pin GPIO_PIN_8
|
||||
#define RS485_EN_GPIO_Port GPIOB
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
|
||||
@@ -46,18 +46,18 @@ void MX_GPIO_Init(void)
|
||||
|
||||
/* GPIO Ports Clock Enable */
|
||||
__HAL_RCC_GPIOH_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOC, W5500_RST_Pin|W5500_INT_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOC, W55001_RST_Pin|W55001_INT_Pin|W5500_RST_Pin|W5500_INT_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOB, RS485_1_EN_Pin|RS485_2_EN_Pin|RS485_3_EN_Pin|SPI2_CS_Pin
|
||||
|BUZZER_Pin|RELAY_4_Pin|RS485_EN_Pin, GPIO_PIN_RESET);
|
||||
|BUZZER_Pin|RELAY_4_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOE, RS485_4_EN_Pin|RELAY_1_Pin|RELAY_2_Pin|RELAY_3_Pin
|
||||
@@ -67,19 +67,19 @@ void MX_GPIO_Init(void)
|
||||
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOD, DS1302_CLK_Pin|DS1302_DIO_Pin|DS1302_RST_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOD, DS1302_CLK_Pin|DS1302_DIO_Pin|DS1302_RST_Pin|ALARM_LED_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pins : W5500_RST_Pin W5500_INT_Pin */
|
||||
GPIO_InitStruct.Pin = W5500_RST_Pin|W5500_INT_Pin;
|
||||
/*Configure GPIO pins : W55001_RST_Pin W55001_INT_Pin W5500_RST_Pin W5500_INT_Pin */
|
||||
GPIO_InitStruct.Pin = W55001_RST_Pin|W55001_INT_Pin|W5500_RST_Pin|W5500_INT_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : RS485_1_EN_Pin RS485_2_EN_Pin RS485_3_EN_Pin SPI2_CS_Pin
|
||||
BUZZER_Pin RS485_EN_Pin */
|
||||
BUZZER_Pin RELAY_4_Pin */
|
||||
GPIO_InitStruct.Pin = RS485_1_EN_Pin|RS485_2_EN_Pin|RS485_3_EN_Pin|SPI2_CS_Pin
|
||||
|BUZZER_Pin|RS485_EN_Pin;
|
||||
|BUZZER_Pin|RELAY_4_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
@@ -113,12 +113,12 @@ void MX_GPIO_Init(void)
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : RELAY_4_Pin */
|
||||
GPIO_InitStruct.Pin = RELAY_4_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
/*Configure GPIO pin : ALARM_LED_Pin */
|
||||
GPIO_InitStruct.Pin = ALARM_LED_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(RELAY_4_GPIO_Port, &GPIO_InitStruct);
|
||||
HAL_GPIO_Init(ALARM_LED_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,5 +11,11 @@
|
||||
#define RTE_COMPONENTS_H
|
||||
|
||||
|
||||
/*
|
||||
* Define the Device Header File:
|
||||
*/
|
||||
#define CMSIS_device_header "stm32f4xx.h"
|
||||
|
||||
|
||||
|
||||
#endif /* RTE_COMPONENTS_H */
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -26,7 +26,7 @@
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
<CLKADS>12000000</CLKADS>
|
||||
<CLKADS>8000000</CLKADS>
|
||||
<OPTTT>
|
||||
<gFlags>1</gFlags>
|
||||
<BeepAtEnd>1</BeepAtEnd>
|
||||
@@ -135,7 +135,7 @@
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>JL2CM3</Key>
|
||||
<Name>-U-O78 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407VGTx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
|
||||
<Name>-U602713110 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407VGTx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
@@ -240,7 +240,87 @@
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>W5500,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>19</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>W5500,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>20</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>record_index</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>21</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>p_data</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>22</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>0x20008495</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>23</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>p_data</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>24</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>rx_temp_buff</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>25</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>rx_temp_buff</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>26</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>\\leakage_system\../usr/bsp/bsp_uart.c\rx_temp_buff[11]</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>27</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>com_uart6</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>28</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>rx_temp_buff</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>29</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>com_to_uart</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<WatchWindow2>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>2</WinNumber>
|
||||
<ItemText>p_data</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>1</count>
|
||||
<WinNumber>2</WinNumber>
|
||||
<ItemText>p_data[0]</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>2</count>
|
||||
<WinNumber>2</WinNumber>
|
||||
<ItemText>rx_temp_buff</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow2>
|
||||
<MemoryWindow4>
|
||||
<Mm>
|
||||
<WinNumber>4</WinNumber>
|
||||
<SubType>0</SubType>
|
||||
<ItemText>p_data</ItemText>
|
||||
<AccSizeX>0</AccSizeX>
|
||||
</Mm>
|
||||
</MemoryWindow4>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
@@ -315,7 +395,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>Application/User/Core</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
<TargetName>leakage_system</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>STM32F407VGTx</Device>
|
||||
<Vendor>STMicroelectronics</Vendor>
|
||||
<PackID>Keil.STM32F4xx_DFP.3.0.0</PackID>
|
||||
<PackURL>https://www.keil.com/pack/</PackURL>
|
||||
<PackID>Keil.STM32F4xx_DFP.2.15.0</PackID>
|
||||
<PackURL>http://www.keil.com/pack/</PackURL>
|
||||
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x10000000,0x00010000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
@@ -81,7 +81,7 @@
|
||||
</BeforeMake>
|
||||
<AfterMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<RunUserProg2>1</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
@@ -185,7 +185,6 @@
|
||||
<uocXRam>0</uocXRam>
|
||||
<RvdsVP>2</RvdsVP>
|
||||
<RvdsMve>0</RvdsMve>
|
||||
<RvdsCdeCp>0</RvdsCdeCp>
|
||||
<hadIRAM2>1</hadIRAM2>
|
||||
<hadIROM2>0</hadIROM2>
|
||||
<StupSel>8</StupSel>
|
||||
@@ -352,7 +351,7 @@
|
||||
<NoWarn>0</NoWarn>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<useXO>0</useXO>
|
||||
<ClangAsOpt>4</ClangAsOpt>
|
||||
<uClangAs>0</uClangAs>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -138,45 +138,47 @@ Mcu.Name=STM32F407V(E-G)Tx
|
||||
Mcu.Package=LQFP100
|
||||
Mcu.Pin0=PH0-OSC_IN
|
||||
Mcu.Pin1=PH1-OSC_OUT
|
||||
Mcu.Pin10=PC5
|
||||
Mcu.Pin11=PB0
|
||||
Mcu.Pin12=PB1
|
||||
Mcu.Pin13=PB2
|
||||
Mcu.Pin14=PE7
|
||||
Mcu.Pin15=PE8
|
||||
Mcu.Pin16=PE9
|
||||
Mcu.Pin17=PE10
|
||||
Mcu.Pin18=PE11
|
||||
Mcu.Pin19=PB10
|
||||
Mcu.Pin2=PA0-WKUP
|
||||
Mcu.Pin20=PB11
|
||||
Mcu.Pin21=PB12
|
||||
Mcu.Pin22=PB13
|
||||
Mcu.Pin23=PB14
|
||||
Mcu.Pin24=PB15
|
||||
Mcu.Pin25=PC6
|
||||
Mcu.Pin26=PC7
|
||||
Mcu.Pin27=PA12
|
||||
Mcu.Pin28=PA13
|
||||
Mcu.Pin29=PA14
|
||||
Mcu.Pin3=PA1
|
||||
Mcu.Pin30=PD3
|
||||
Mcu.Pin31=PD4
|
||||
Mcu.Pin32=PD5
|
||||
Mcu.Pin33=PB4
|
||||
Mcu.Pin34=PB5
|
||||
Mcu.Pin35=PB6
|
||||
Mcu.Pin36=PB7
|
||||
Mcu.Pin37=PB8
|
||||
Mcu.Pin38=VP_IWDG_VS_IWDG
|
||||
Mcu.Pin39=VP_SYS_VS_Systick
|
||||
Mcu.Pin4=PA2
|
||||
Mcu.Pin5=PA3
|
||||
Mcu.Pin6=PA5
|
||||
Mcu.Pin7=PA6
|
||||
Mcu.Pin8=PA7
|
||||
Mcu.Pin9=PC4
|
||||
Mcu.PinsNb=40
|
||||
Mcu.Pin10=PA7
|
||||
Mcu.Pin11=PC4
|
||||
Mcu.Pin12=PC5
|
||||
Mcu.Pin13=PB0
|
||||
Mcu.Pin14=PB1
|
||||
Mcu.Pin15=PB2
|
||||
Mcu.Pin16=PE7
|
||||
Mcu.Pin17=PE8
|
||||
Mcu.Pin18=PE9
|
||||
Mcu.Pin19=PE10
|
||||
Mcu.Pin2=PC2
|
||||
Mcu.Pin20=PE11
|
||||
Mcu.Pin21=PB10
|
||||
Mcu.Pin22=PB11
|
||||
Mcu.Pin23=PB12
|
||||
Mcu.Pin24=PB13
|
||||
Mcu.Pin25=PB14
|
||||
Mcu.Pin26=PB15
|
||||
Mcu.Pin27=PC6
|
||||
Mcu.Pin28=PC7
|
||||
Mcu.Pin29=PA12
|
||||
Mcu.Pin3=PC3
|
||||
Mcu.Pin30=PA13
|
||||
Mcu.Pin31=PA14
|
||||
Mcu.Pin32=PD3
|
||||
Mcu.Pin33=PD4
|
||||
Mcu.Pin34=PD5
|
||||
Mcu.Pin35=PD7
|
||||
Mcu.Pin36=PB6
|
||||
Mcu.Pin37=PB7
|
||||
Mcu.Pin38=PB8
|
||||
Mcu.Pin39=PB9
|
||||
Mcu.Pin4=PA0-WKUP
|
||||
Mcu.Pin40=VP_IWDG_VS_IWDG
|
||||
Mcu.Pin41=VP_SYS_VS_Systick
|
||||
Mcu.Pin5=PA1
|
||||
Mcu.Pin6=PA2
|
||||
Mcu.Pin7=PA3
|
||||
Mcu.Pin8=PA5
|
||||
Mcu.Pin9=PA6
|
||||
Mcu.PinsNb=42
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32F407VGTx
|
||||
@@ -268,15 +270,6 @@ PB2.GPIOParameters=GPIO_Label
|
||||
PB2.GPIO_Label=RS485_3_EN
|
||||
PB2.Locked=true
|
||||
PB2.Signal=GPIO_Output
|
||||
PB4.GPIOParameters=GPIO_Label
|
||||
PB4.GPIO_Label=BUZZER
|
||||
PB4.Locked=true
|
||||
PB4.Signal=GPIO_Output
|
||||
PB5.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||
PB5.GPIO_Label=RELAY_4
|
||||
PB5.GPIO_PuPd=GPIO_PULLUP
|
||||
PB5.Locked=true
|
||||
PB5.Signal=GPIO_Output
|
||||
PB6.Locked=true
|
||||
PB6.Mode=Asynchronous
|
||||
PB6.Signal=USART1_TX
|
||||
@@ -284,9 +277,21 @@ PB7.Locked=true
|
||||
PB7.Mode=Asynchronous
|
||||
PB7.Signal=USART1_RX
|
||||
PB8.GPIOParameters=GPIO_Label
|
||||
PB8.GPIO_Label=RS485_EN
|
||||
PB8.GPIO_Label=BUZZER
|
||||
PB8.Locked=true
|
||||
PB8.Signal=GPIO_Output
|
||||
PB9.GPIOParameters=GPIO_Label
|
||||
PB9.GPIO_Label=RELAY_4
|
||||
PB9.Locked=true
|
||||
PB9.Signal=GPIO_Output
|
||||
PC2.GPIOParameters=GPIO_Label
|
||||
PC2.GPIO_Label=W55001_RST
|
||||
PC2.Locked=true
|
||||
PC2.Signal=GPIO_Output
|
||||
PC3.GPIOParameters=GPIO_Label
|
||||
PC3.GPIO_Label=W55001_INT
|
||||
PC3.Locked=true
|
||||
PC3.Signal=GPIO_Output
|
||||
PC4.GPIOParameters=GPIO_Label
|
||||
PC4.GPIO_Label=W5500_RST
|
||||
PC4.Locked=true
|
||||
@@ -301,6 +306,14 @@ PC6.Signal=USART6_TX
|
||||
PC7.Locked=true
|
||||
PC7.Mode=Asynchronous
|
||||
PC7.Signal=USART6_RX
|
||||
PCC.Checker=false
|
||||
PCC.Display=Plot\: All Steps
|
||||
PCC.Line=STM32F407/417
|
||||
PCC.MCU=STM32F407V(E-G)Tx
|
||||
PCC.PartNumber=STM32F407VGTx
|
||||
PCC.Series=STM32F4
|
||||
PCC.Temperature=25
|
||||
PCC.Vdd=3.3
|
||||
PD3.GPIOParameters=GPIO_Label
|
||||
PD3.GPIO_Label=DS1302_CLK
|
||||
PD3.Locked=true
|
||||
@@ -313,6 +326,13 @@ PD5.GPIOParameters=GPIO_Label
|
||||
PD5.GPIO_Label=DS1302_RST
|
||||
PD5.Locked=true
|
||||
PD5.Signal=GPIO_Output
|
||||
PD7.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
|
||||
PD7.GPIO_Label=ALARM_LED
|
||||
PD7.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD
|
||||
PD7.GPIO_PuPd=GPIO_NOPULL
|
||||
PD7.Locked=true
|
||||
PD7.PinState=GPIO_PIN_RESET
|
||||
PD7.Signal=GPIO_Output
|
||||
PE10.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||
PE10.GPIO_Label=RELAY_3
|
||||
PE10.GPIO_PuPd=GPIO_PULLUP
|
||||
@@ -353,6 +373,7 @@ ProjectManager.DeletePrevious=true
|
||||
ProjectManager.DeviceId=STM32F407VGTx
|
||||
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.28.3
|
||||
ProjectManager.FreePins=false
|
||||
ProjectManager.FreePinsContext=
|
||||
ProjectManager.HalAssertFull=false
|
||||
ProjectManager.HeapSize=0x200
|
||||
ProjectManager.KeepUserCode=true
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#include "gui_tjc_hmi.h"
|
||||
|
||||
const char *HwVersion = "V2.0";
|
||||
char SwVersion[24] = "V0.005.0";
|
||||
const char *HwVersion = "V2.1";
|
||||
char SwVersion[24] = "V0.006.0";
|
||||
void task_idle(void);
|
||||
void task_10ms(void);
|
||||
void task_50ms(void);
|
||||
|
||||
@@ -34,7 +34,7 @@ bsp_W5500_t W5500 =
|
||||
.Gateway_IP = {192,168,100,1}, /*网关IP地址*/
|
||||
.Sub_Mask = {255,255,255,0}, /*子网掩码*/
|
||||
.Phy_Addr = {0x0c,0x29,0xab,0x7c,0x00,0x01}, /*物理地址(MAC) 根据单片机UID生成随机的MAC*/
|
||||
.IP_Addr = {192,168,100,201}, /*本机IP地址*/
|
||||
.IP_Addr = {192,168,100,203}, /*本机IP地址*/
|
||||
|
||||
.Interrupt_Process = bsp_W5500_Interrupt_Process,
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ static bsp_buzzer_flash_data_t flash_data;
|
||||
/*其他外设初始化后快速闪烁,提示初始化完成*/
|
||||
static void bsp_buzzer_init(void)
|
||||
{
|
||||
// BUZZER_ON;
|
||||
BUZZER_OFF;
|
||||
p_buzzer->p_flash_data = &flash_data;
|
||||
bsp_buzzer_flash_data_load();
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
#define RELAY_3_ON HAL_GPIO_WritePin (RELAY_3_GPIO_Port, RELAY_3_Pin, RELAY_GPIO_ON)
|
||||
#define RELAY_3_OFF HAL_GPIO_WritePin (RELAY_3_GPIO_Port, RELAY_3_Pin, RELAY_GPIO_OFF)
|
||||
|
||||
#define RELAY_4_ON HAL_GPIO_WritePin (RELAY_4_GPIO_Port, RELAY_4_Pin, RELAY_GPIO_ON)
|
||||
#define RELAY_4_OFF HAL_GPIO_WritePin (RELAY_4_GPIO_Port, RELAY_4_Pin, RELAY_GPIO_OFF)
|
||||
/*报警灯改为PD7,使用开漏输出解决硬件电平压差不够*/
|
||||
#define RELAY_4_ON HAL_GPIO_WritePin (ALARM_LED_GPIO_Port, ALARM_LED_Pin, RELAY_GPIO_OFF)
|
||||
#define RELAY_4_OFF HAL_GPIO_WritePin (ALARM_LED_GPIO_Port, ALARM_LED_Pin, RELAY_GPIO_ON)
|
||||
|
||||
static void bsp_relay_init(void);
|
||||
static void bsp_relay_task(void);
|
||||
|
||||
@@ -19,7 +19,7 @@ typedef struct bsp_uart_t bsp_uart_t;
|
||||
#define BSP_UART_BAUD_RATE_9600 (9600)
|
||||
#define BSP_UART_BAUD_RATE_19200 (19200)
|
||||
#define BSP_UART_BAUD_RATE_57600 (57600)
|
||||
#define BSP_UART_BAUD_RATE_115200 (57600)
|
||||
#define BSP_UART_BAUD_RATE_115200 (115200)
|
||||
|
||||
/******************************************
|
||||
* 结构体: bsp_uart_relay_t
|
||||
|
||||
@@ -1734,24 +1734,6 @@ static void gui_tjc_hmi_device_config_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
u8 current_enabled_index = 0; /*当前是第几个启用的设备*/
|
||||
u8 device_index;
|
||||
|
||||
/*计算启用的设备数量*/
|
||||
// enabled_device_count = 0;
|
||||
// for(i = 0; i < APP_LEAKAGE_SUB_DEVICE_NUM; i++)
|
||||
// {
|
||||
// if(leakage.sub_device_data[i].flash_data.state == ENABLE)
|
||||
// {
|
||||
// enabled_device_count++;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /*计算总页数*/
|
||||
// page_num = enabled_device_count / DEVICES_PER_PAGE;
|
||||
// remain_region_num = enabled_device_count % DEVICES_PER_PAGE;
|
||||
// if(remain_region_num > 0)
|
||||
// {
|
||||
// page_num++;
|
||||
// }
|
||||
//
|
||||
/*确保页码在有效范围内*/
|
||||
if (p_tjc_hmi->page.device_config_index >= page_num)
|
||||
{
|
||||
@@ -2001,45 +1983,6 @@ static void gui_tjc_hmi_device_config_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
}
|
||||
}
|
||||
|
||||
// /*解析波特率*/
|
||||
// for(i = 0; i < 10; i++) // 波特率最大为115200
|
||||
// {
|
||||
// if(current_pos[i] == HMI_PROTO_ASCII_RX_DELINITER)
|
||||
// {
|
||||
// if(i == 0)
|
||||
// {
|
||||
// /*波特率不能为空*/
|
||||
// return;
|
||||
// }
|
||||
|
||||
// char baud_str[10] = {0};
|
||||
// memcpy(baud_str, current_pos, i);
|
||||
// baud_str[i] = '\0';
|
||||
|
||||
// /*将字符串波特率转换为数值*/
|
||||
// if(strcmp(baud_str, "2400") == 0)
|
||||
// {
|
||||
// new_device.baudrate = 0;
|
||||
// }
|
||||
// else if(strcmp(baud_str, "4800") == 0)
|
||||
// {
|
||||
// new_device.baudrate = 1;
|
||||
// }
|
||||
// else if(strcmp(baud_str, "9600") == 0)
|
||||
// {
|
||||
// new_device.baudrate = 2;
|
||||
// }
|
||||
// else if(strcmp(baud_str, "115200") == 0)
|
||||
// {
|
||||
// new_device.baudrate = 3;
|
||||
// }
|
||||
|
||||
// current_pos += (i + 1);
|
||||
// field_count++;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
/*解析区域名*/
|
||||
for (i = 0; i < APP_LEAKAGE_STRING_NANE_LEN; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user