htujun 3 years ago
parent
commit
15c36cd7e5
  1. BIN
      stm32/OBJ/Template.axf
  2. 19
      stm32/OBJ/Template.build_log.htm
  3. 2798
      stm32/OBJ/Template.hex
  4. 494
      stm32/OBJ/Template.htm
  5. 2
      stm32/OBJ/Template_Target 1.dep
  6. BIN
      stm32/OBJ/main.crf
  7. BIN
      stm32/OBJ/main.o
  8. 1026
      stm32/USER/Template.map
  9. 68
      stm32/USER/Template.uvguix.QY
  10. 29
      stm32/USER/main.c

BIN
stm32/OBJ/Template.axf

Binary file not shown.

19
stm32/OBJ/Template.build_log.htm

@ -27,22 +27,7 @@ Project File Date: 05/10/2022
<h2>Output:</h2> <h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin' *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Target 1' Build target 'Target 1'
compiling main.c... "..\OBJ\Template.axf" - 0 Error(s), 0 Warning(s).
..\HARDWARE\DS1302\DS1302.h(79): warning: #1-D: last line of file ends without a newline
#endif
..\HARDWARE\KEY\key.h(6): warning: #47-D: incompatible redefinition of macro "IN" (declared at line 14 of "..\HARDWARE\DS1302\DS1302.h")
#define IN GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_8)//¶ÁÈ¡°´¼ü0
..\HARDWARE\KEY\key.h(7): warning: #47-D: incompatible redefinition of macro "OUT" (declared at line 13 of "..\HARDWARE\DS1302\DS1302.h")
#define OUT GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_9)//¶ÁÈ¡°´¼ü1
main.c(129): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
OLED_ShowString(0, 0, str, 16);
main.c(317): warning: #177-D: variable "pwm" was declared but never referenced
int x=0, pwm; //bh1750模å<EFBFBD>—获å<EFBFBD>–到的数æ<EFBFBD>®
main.c: 5 warnings, 0 errors
linking...
Program Size: Code=20560 RO-data=2408 RW-data=408 ZI-data=1456
FromELF: creating hex file...
"..\OBJ\Template.axf" - 0 Error(s), 5 Warning(s).
<h2>Software Packages used:</h2> <h2>Software Packages used:</h2>
@ -56,7 +41,7 @@ Package Vendor: Keil
D:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0\Device\Include D:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0\Device\Include
<h2>Collection of Component Files used:</h2> <h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:01 Build Time Elapsed: 00:00:03
</pre> </pre>
</body> </body>
</html> </html>

2798
stm32/OBJ/Template.hex

File diff suppressed because it is too large Load Diff

494
stm32/OBJ/Template.htm

File diff suppressed because it is too large Load Diff

2
stm32/OBJ/Template_Target 1.dep

@ -1,5 +1,5 @@
Dependencies for Project 'Template', Target 'Target 1': (DO NOT MODIFY !) Dependencies for Project 'Template', Target 'Target 1': (DO NOT MODIFY !)
F (.\main.c)(0x62827284)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 --apcs=interwork -I ..\HARDWARE\LED -I ..\SYSTEM\delay -I ..\SYSTEM\sys -I ..\SYSTEM\usart -I ..\USER -I ..\STM32F10x_FWLib\inc -I ..\CORE -I ..\HARDWARE\ESP8266 -I ..\HARDWARE\DHT11 -I ..\HARDWARE\LCD1602 -I ..\HARDWARE\ADC -I ..\HARDWARE\TIMER -I ..\HARDWARE\DS18B20 -I ..\HARDWARE\cJSON -I ..\HARDWARE\DS1302 -I ..\HARDWARE\LCD -I ..\HARDWARE\OLED -I ..\HARDWARE\KEY -I ..\HARDWARE\MOTOR -I ..\HARDWARE\24CXX -I ..\HARDWARE\IIC -I ..\HARDWARE\BH1750 -I ..\HARDWARE\WDG -I.\RTE\_Target_1 -ID:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0\Device\Include -ID:\Keil_v5\ARM\CMSIS\Include -D__UVISION_VERSION="525" -DSTM32F10X_MD -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -o ..\obj\main.o --omf_browse ..\obj\main.crf --depend ..\obj\main.d) F (.\main.c)(0x6284D3CD)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 --apcs=interwork -I ..\HARDWARE\LED -I ..\SYSTEM\delay -I ..\SYSTEM\sys -I ..\SYSTEM\usart -I ..\USER -I ..\STM32F10x_FWLib\inc -I ..\CORE -I ..\HARDWARE\ESP8266 -I ..\HARDWARE\DHT11 -I ..\HARDWARE\LCD1602 -I ..\HARDWARE\ADC -I ..\HARDWARE\TIMER -I ..\HARDWARE\DS18B20 -I ..\HARDWARE\cJSON -I ..\HARDWARE\DS1302 -I ..\HARDWARE\LCD -I ..\HARDWARE\OLED -I ..\HARDWARE\KEY -I ..\HARDWARE\MOTOR -I ..\HARDWARE\24CXX -I ..\HARDWARE\IIC -I ..\HARDWARE\BH1750 -I ..\HARDWARE\WDG -I.\RTE\_Target_1 -ID:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0\Device\Include -ID:\Keil_v5\ARM\CMSIS\Include -D__UVISION_VERSION="525" -DSTM32F10X_MD -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -o ..\obj\main.o --omf_browse ..\obj\main.crf --depend ..\obj\main.d)
I (..\HARDWARE\LED\led.h)(0x62825E8E) I (..\HARDWARE\LED\led.h)(0x62825E8E)
I (..\SYSTEM\sys\sys.h)(0x6256947A) I (..\SYSTEM\sys\sys.h)(0x6256947A)
I (..\USER\stm32f10x.h)(0x6256947A) I (..\USER\stm32f10x.h)(0x6256947A)

BIN
stm32/OBJ/main.crf

Binary file not shown.

BIN
stm32/OBJ/main.o

Binary file not shown.

1026
stm32/USER/Template.map

File diff suppressed because it is too large Load Diff

68
stm32/USER/Template.uvguix.QY

File diff suppressed because one or more lines are too long

29
stm32/USER/main.c

@ -38,7 +38,7 @@ struct UserInfo{
struct UserInfo userInfo; struct UserInfo userInfo;
struct timing nowTime; struct timing nowTime;
u8 Settime[6]={0x22,0x04,0x27,0x19,0x17,0x00}; // 设置时间 22年 03月 27日 22:34:00 u8 Settime[6]={0x22,0x05,0x18,0x18,0x51,0x00}; // 设置时间 22年 03月 27日 22:34:00
int setModel = 0; int setModel = 0;
int change = 0; int change = 0;
@ -108,7 +108,7 @@ void Sys_Init(void)
OLED_Init(); OLED_Init();
Key4x4_GPIO_Config(); Key4x4_GPIO_Config();
DS1302_init(Settime); DS1302_init(Settime);
DS1302_SetTime(Settime); //DS1302_SetTime(Settime);
OLED_Clear(); OLED_Clear();
bh_data_send(BHPowOn); bh_data_send(BHPowOn);
} }
@ -323,23 +323,33 @@ void TaskProcessing()
keyHandling(); keyHandling();
if(userInfo.warn == 0) flag = 0;
// 超过时间报警 // 超过时间报警
if(getTimerResult() && userInfo.warn){ if(getTimerResult()){
if(flag == 0) { if(flag == 0) {
min = userInfo.SetTimer.min + 1; min = userInfo.SetTimer.min;
sec = userInfo.SetTimer.sec; sec = userInfo.SetTimer.sec + 3;
if(min >= 60){ if(sec >= 60){
min = min - 60; sec = sec - 60;
min += 1;
if(min >= 60) min = min - 60;
} }
flag = 1; flag = 1;
}else{ }else{
if(min == nowTime.min && sec == nowTime.sec){ if(min == nowTime.min && sec == nowTime.sec){
if(flag == 1){
userInfo.warn = 0; userInfo.warn = 0;
flag = 0; min = nowTime.min + 5;
sec = nowTime.sec;
if(min >= 60) min = min - 60;
flag = 2;
}else if(flag == 2){
flag = 3;
}
} }
} }
if(userInfo.warn) Warning(); if(userInfo.warn) Warning();
}else{
flag = 0;
} }
LED0 = 0; LED0 = 0;
@ -350,6 +360,7 @@ void TaskProcessing()
if(userInfo.num >= userInfo.num_th3) LED2 = 1; if(userInfo.num >= userInfo.num_th3) LED2 = 1;
if(userInfo.light > userInfo.light_threshold) LED0 = 0,LED1 = 0,LED2 = 0; if(userInfo.light > userInfo.light_threshold) LED0 = 0,LED1 = 0,LED2 = 0;
if(flag == 3) LED0 = 0,LED1 = 0,LED2 = 0;
AT24CXX_WriteOneByte(0, userInfo.SetTimer.hour); AT24CXX_WriteOneByte(0, userInfo.SetTimer.hour);
AT24CXX_WriteOneByte(1, userInfo.SetTimer.min); AT24CXX_WriteOneByte(1, userInfo.SetTimer.min);

Loading…
Cancel
Save