diff --git a/stm32/HARDWARE/DCmotor/motor.c b/stm32/HARDWARE/DCmotor/motor.c index 54cad0e..3f6f1bf 100644 --- a/stm32/HARDWARE/DCmotor/motor.c +++ b/stm32/HARDWARE/DCmotor/motor.c @@ -1,3 +1,4 @@ + #include "motor.h" #include "timer.h" #include "delay.h" @@ -5,73 +6,18 @@ u16 Ypwmva=0; u16 Zpwmva=0; + void motor_Init(void) { - GPIO_InitTypeDef GPIO_InitStructure; - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOA, ENABLE); + RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5|GPIO_Pin_0; //PB5、PB0 端口配置 - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出 - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO口速度为50MHz - GPIO_Init(GPIOB, &GPIO_InitStructure); //根据设定参数初始化 - GPIO_SetBits(GPIOB,GPIO_Pin_5|GPIO_Pin_0); - - -// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10|GPIO_Pin_13|GPIO_Pin_14|GPIO_Pin_0; -// GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; //PA8,9,10,13,14,15设置成输入,默认下拉 -// GPIO_Init(GPIOA, &GPIO_InitStructure);//初始化GPIOA -// -// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10|GPIO_Pin_11; -// GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; //PC10,11设置成输入,默认下拉 -// GPIO_Init(GPIOC, &GPIO_InitStructure);//初始化GPIOC - + GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13|GPIO_Pin_14; //PB5锟斤拷PB0 锟剿匡拷锟斤拷锟斤拷 + GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //锟斤拷锟斤拷锟斤拷锟 + GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO锟斤拷锟劫讹拷为50MHz + GPIO_Init(GPIOC, &GPIO_InitStructure); //锟斤拷锟斤拷锟借定锟斤拷锟斤拷锟斤拷始锟斤拷 + GPIO_SetBits(GPIOC,GPIO_Pin_13|GPIO_Pin_14); } -void PWM_init(void) -{ - TIM_SetCompare2(TIM3,10); - TIM_SetCompare3(TIM3,10); -} - -void run(void)//前进 -{ - Ypwmva=450; - Zpwmva=450; - Right_moto_go; - Left_moto_go; -} -void stop(void)//停止 -{ - Ypwmva=0; - Zpwmva=0; - Right_moto_go; - Left_moto_go; -} - -void backrun(void)//后退 -{ - Ypwmva=450; - Zpwmva=450; - Left_moto_back; - Right_moto_back; -} - -void leftrun(void)//左转 -{ - Ypwmva=500; - Zpwmva=500; - Right_moto_back; - Left_moto_go; -} - -void rightrun(void)//右转 -{ - Ypwmva=500; - Zpwmva=500; - Right_moto_go; - Left_moto_back; - -} diff --git a/stm32/HARDWARE/DCmotor/motor.h b/stm32/HARDWARE/DCmotor/motor.h index d3dafcc..7bf7515 100644 --- a/stm32/HARDWARE/DCmotor/motor.h +++ b/stm32/HARDWARE/DCmotor/motor.h @@ -3,30 +3,10 @@ #include "sys.h" -#define ENA PBout(0)//电机驱动 -#define ENB PBout(5) +#define FAN PCout(14) // PC12 +#define CLEAN PCout(13) // PC13 -#define IN1 PBout(12) -#define IN2 PBout(13) -#define IN3 PBout(14) -#define IN4 PBout(15) - - -#define Right_moto_go {IN3=0,IN4=1;} //右电机向前走 -#define Right_moto_back {IN3=1,IN4=0;} //右边电机向后转 -#define Left_moto_Stop {ENA=0;} //左边电机停转 -#define Left_moto_go {IN1=0,IN2=1;} //左边电机向前走 -#define Left_moto_back {IN1=1,IN2=0;} //左边电机向后走 -#define Right_moto_Stop {ENB=0;} //右边电机停转 - -void motor_Init(void);//电机IO口初始化 -void PWM_init(void);//电机速度初始化 - -void run(void);//前进 -void backrun(void);//后退 -void leftrun(void);//左转 -void rightrun(void);//右转 -void stop(void);//停止 +void motor_Init(void);//锟斤拷锟絀O锟节筹拷始锟斤拷 #endif diff --git a/stm32/HARDWARE/DS18B20/ds18b20.c b/stm32/HARDWARE/DS18B20/ds18b20.c index a4f051e..cee46a4 100644 --- a/stm32/HARDWARE/DS18B20/ds18b20.c +++ b/stm32/HARDWARE/DS18B20/ds18b20.c @@ -1,36 +1,35 @@ #include "ds18b20.h" #include "delay.h" ////////////////////////////////////////////////////////////////////////////////// -//本程序只供学习使用,未经作者许可,不得用于其它任何用途 -//ALIENTEK精英STM32开发板 -//DS18B20驱动代码 -//正点原子@ALIENTEK -//技术论坛:www.openedv.com -//修改日期:2012/9/12 -//版本:V1.0 -//版权所有,盗版必究。 -//Copyright(C) 广州市星翼电子科技有限公司 2009-2019 +//鏈▼搴忓彧渚涘涔犱娇鐢紝鏈粡浣滆呰鍙紝涓嶅緱鐢ㄤ簬鍏跺畠浠讳綍鐢ㄩ +//ALIENTEK miniSTM32寮鍙戞澘 +//DS18B20椹卞姩浠g爜 +//姝g偣鍘熷瓙@ALIENTEK +//鎶鏈鍧:www.openedv.com +//淇敼鏃ユ湡:2012/9/12 +//鐗堟湰锛歏1.0 +//鐗堟潈鎵鏈夛紝鐩楃増蹇呯┒銆 +//Copyright(C) 骞垮窞甯傛槦缈肩數瀛愮鎶鏈夐檺鍏徃 2009-2019 //All rights reserved ////////////////////////////////////////////////////////////////////////////////// - -//复位DS18B20 +//澶嶄綅DS18B20 void DS18B20_Rst(void) { - DS18B20_IO_OUT(); //SET PG11 OUTPUT - DS18B20_DQ_OUT=0; //拉低DQ - delay_us(750); //拉低750us - DS18B20_DQ_OUT=1; //DQ=1 - delay_us(15); //15US + DS18B20_IO_OUT(); //SET PA0 OUTPUT + DS18B20_DQ_OUT=0; //鎷変綆DQ + delay_us(750); //鎷変綆750us + DS18B20_DQ_OUT=1; //DQ=1 + delay_us(15); //15US } -//等待DS18B20的回应 -//返回1:未检测到DS18B20的存在 -//返回0:存在 +//绛夊緟DS18B20鐨勫洖搴 +//杩斿洖1:鏈娴嬪埌DS18B20鐨勫瓨鍦 +//杩斿洖0:瀛樺湪 u8 DS18B20_Check(void) { u8 retry=0; - DS18B20_IO_IN(); //SET PG11 INPUT + DS18B20_IO_IN();//SET PA0 INPUT while (DS18B20_DQ_IN&&retry<200) { retry++; @@ -46,25 +45,25 @@ u8 DS18B20_Check(void) if(retry>=240)return 1; return 0; } -//从DS18B20读取一个位 -//返回值:1/0 -u8 DS18B20_Read_Bit(void) +//浠嶥S18B20璇诲彇涓涓綅 +//杩斿洖鍊硷細1/0 +u8 DS18B20_Read_Bit(void) // read one bit { u8 data; - DS18B20_IO_OUT(); //SET PG11 OUTPUT + DS18B20_IO_OUT();//SET PA0 OUTPUT DS18B20_DQ_OUT=0; delay_us(2); DS18B20_DQ_OUT=1; - DS18B20_IO_IN(); //SET PG11 INPUT + DS18B20_IO_IN();//SET PA0 INPUT delay_us(12); if(DS18B20_DQ_IN)data=1; else data=0; delay_us(50); return data; } -//从DS18B20读取一个字节 -//返回值:读到的数据 -u8 DS18B20_Read_Byte(void) +//浠嶥S18B20璇诲彇涓涓瓧鑺 +//杩斿洖鍊硷細璇诲埌鐨勬暟鎹 +u8 DS18B20_Read_Byte(void) // read one byte { u8 i,j,dat; dat=0; @@ -75,92 +74,88 @@ u8 DS18B20_Read_Byte(void) } return dat; } -//写一个字节到DS18B20 -//dat:要写入的字节 +//鍐欎竴涓瓧鑺傚埌DS18B20 +//dat锛氳鍐欏叆鐨勫瓧鑺 void DS18B20_Write_Byte(u8 dat) { u8 j; u8 testb; - DS18B20_IO_OUT(); //SET PG11 OUTPUT; + DS18B20_IO_OUT();//SET PA0 OUTPUT; for (j=1;j<=8;j++) { testb=dat&0x01; dat=dat>>1; if (testb) { - DS18B20_DQ_OUT=0; // Write 1 + DS18B20_DQ_OUT=0;// Write 1 delay_us(2); DS18B20_DQ_OUT=1; delay_us(60); } else { - DS18B20_DQ_OUT=0; // Write 0 + DS18B20_DQ_OUT=0;// Write 0 delay_us(60); DS18B20_DQ_OUT=1; delay_us(2); } } } -//开始温度转换 -void DS18B20_Start(void) +//寮濮嬫俯搴﹁浆鎹 +void DS18B20_Start(void)// ds1820 start convert { DS18B20_Rst(); - DS18B20_Check(); - DS18B20_Write_Byte(0xcc); // skip rom - DS18B20_Write_Byte(0x44); // convert + DS18B20_Check(); + DS18B20_Write_Byte(0xcc);// skip rom + DS18B20_Write_Byte(0x44);// convert } - -//初始化DS18B20的IO口 DQ 同时检测DS的存在 -//返回1:不存在 -//返回0:存在 +//鍒濆鍖朌S18B20鐨処O鍙 DQ 鍚屾椂妫娴婦S鐨勫瓨鍦 +//杩斿洖1:涓嶅瓨鍦 +//杩斿洖0:瀛樺湪 u8 DS18B20_Init(void) { GPIO_InitTypeDef GPIO_InitStructure; - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); //使能PORTG口时钟 + RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); //浣胯兘PORTA鍙f椂閽 - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11; //PORTG.11 推挽输出 + GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; //PORTA0 鎺ㄦ尳杈撳嚭 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOA, &GPIO_InitStructure); - GPIO_SetBits(GPIOA,GPIO_Pin_11); //输出1 + GPIO_SetBits(GPIOA,GPIO_Pin_0); //杈撳嚭1 DS18B20_Rst(); return DS18B20_Check(); } -//从ds18b20得到温度值 -//精度:0.1C -//返回值:温度值 (-550~1250) +//浠巇s18b20寰楀埌娓╁害鍊 +//绮惧害锛0.1C +//杩斿洖鍊硷細娓╁害鍊 锛-550~1250锛 short DS18B20_Get_Temp(void) { u8 temp; u8 TL,TH; short tem; - DS18B20_Start (); // ds1820 start convert + DS18B20_Start (); // ds1820 start convert DS18B20_Rst(); DS18B20_Check(); - DS18B20_Write_Byte(0xcc); // skip rom - DS18B20_Write_Byte(0xbe); // convert - TL=DS18B20_Read_Byte(); // LSB - TH=DS18B20_Read_Byte(); // MSB + DS18B20_Write_Byte(0xcc);// skip rom + DS18B20_Write_Byte(0xbe);// convert + TL=DS18B20_Read_Byte(); // LSB + TH=DS18B20_Read_Byte(); // MSB if(TH>7) { TH=~TH; TL=~TL; - temp=0; //温度为负 - }else temp=1; //温度为正 - tem=TH; //获得高八位 + temp=0;//娓╁害涓鸿礋 + }else temp=1;//娓╁害涓烘 + tem=TH; //鑾峰緱楂樺叓浣 tem<<=8; - tem+=TL; //获得底八位 - tem=(float)tem*0.625; //转换 - if(temp)return tem; //返回温度值 + tem+=TL;//鑾峰緱搴曞叓浣 + tem=(float)tem*0.625;//杞崲 + if(temp)return tem; //杩斿洖娓╁害鍊 else return -tem; -} - - - +} diff --git a/stm32/HARDWARE/DS18B20/ds18b20.h b/stm32/HARDWARE/DS18B20/ds18b20.h index 304185c..e110d7f 100644 --- a/stm32/HARDWARE/DS18B20/ds18b20.h +++ b/stm32/HARDWARE/DS18B20/ds18b20.h @@ -1,37 +1,42 @@ +/* + * @Author: your name + * @Date: 2022-04-10 12:08:03 + * @LastEditTime: 2022-04-13 02:13:14 + * @LastEditors: your name + * @Description: 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \20220410-IntelligentPiggery\stm32\HARDWARE\DS18B20\ds18b20.h + */ #ifndef __DS18B20_H #define __DS18B20_H #include "sys.h" ////////////////////////////////////////////////////////////////////////////////// -//本程序只供学习使用,未经作者许可,不得用于其它任何用途 -//ALIENTEK战舰STM32开发板 -//DS18B20驱动代码 -//正点原子@ALIENTEK -//技术论坛:www.openedv.com -//修改日期:2012/9/12 -//版本:V1.0 -//版权所有,盗版必究。 -//Copyright(C) 广州市星翼电子科技有限公司 2009-2019 +//鏈▼搴忓彧渚涘涔犱娇鐢紝鏈粡浣滆呰鍙紝涓嶅緱鐢ㄤ簬鍏跺畠浠讳綍鐢ㄩ +//ALIENTEK MiniSTM32寮鍙戞澘 +//DS18B20椹卞姩浠g爜 +//姝g偣鍘熷瓙@ALIENTEK +//鎶鏈鍧:www.openedv.com +//淇敼鏃ユ湡:2014/3/12 +//鐗堟湰锛歏1.0 +//鐗堟潈鎵鏈夛紝鐩楃増蹇呯┒銆 +//Copyright(C) 骞垮窞甯傛槦缈肩數瀛愮鎶鏈夐檺鍏徃 2009-2019 //All rights reserved ////////////////////////////////////////////////////////////////////////////////// -//IO方向设置 -#define DS18B20_IO_IN() {GPIOA->CRH&=0XFFFF0FFF;GPIOA->CRH|=8<<12;} -#define DS18B20_IO_OUT() {GPIOA->CRH&=0XFFFF0FFF;GPIOA->CRH|=3<<12;} - -////IO操作函数 -#define DS18B20_DQ_OUT PAout(11) //数据端口 PA0 -#define DS18B20_DQ_IN PAin(11) //数据端口 PA0 +//IO鏂瑰悜璁剧疆 +#define DS18B20_IO_IN() {GPIOA->CRL&=0XFFFFFFF0;GPIOA->CRL|=8<<0;} +#define DS18B20_IO_OUT() {GPIOA->CRL&=0XFFFFFFF0;GPIOA->CRL|=3<<0;} +////IO鎿嶄綔鍑芥暟 +#define DS18B20_DQ_OUT PAout(0) //鏁版嵁绔彛 PA0 +#define DS18B20_DQ_IN PAin(0) //鏁版嵁绔彛 PA0 -u8 DS18B20_Init(void);//初始化DS18B20 -short DS18B20_Get_Temp(void);//获取温度 -void DS18B20_Start(void);//开始温度转换 -void DS18B20_Write_Byte(u8 dat);//写入一个字节 -u8 DS18B20_Read_Byte(void);//读出一个字节 -u8 DS18B20_Read_Bit(void);//读出一个位 -u8 DS18B20_Check(void);//检测是否存在DS18B20 -void DS18B20_Rst(void);//复位DS18B20 - - +u8 DS18B20_Init(void); //鍒濆鍖朌S18B20 +short DS18B20_Get_Temp(void); //鑾峰彇娓╁害 +void DS18B20_Start(void); //寮濮嬫俯搴﹁浆鎹 +void DS18B20_Write_Byte(u8 dat);//鍐欏叆涓涓瓧鑺 +u8 DS18B20_Read_Byte(void); //璇诲嚭涓涓瓧鑺 +u8 DS18B20_Read_Bit(void); //璇诲嚭涓涓綅 +u8 DS18B20_Check(void); //妫娴嬫槸鍚﹀瓨鍦―S18B20 +void DS18B20_Rst(void); //澶嶄綅DS18B20 #endif diff --git a/stm32/HARDWARE/LED/led.c b/stm32/HARDWARE/LED/led.c index 06efddb..fc443dd 100644 --- a/stm32/HARDWARE/LED/led.c +++ b/stm32/HARDWARE/LED/led.c @@ -1,52 +1,30 @@ +/* + * @Author: your name + * @Date: 2022-04-10 10:08:56 + * @LastEditTime: 2022-04-13 03:15:55 + * @LastEditors: Please set LastEditors + * @Description: 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \20220410-IntelligentPiggery\stm32\HARDWARE\LED\led.c + */ #include "led.h" -void Motor_Init(void) -{ - GPIO_InitTypeDef GPIO_InitStructure; - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA|RCC_APB2Periph_AFIO|RCC_APB2Periph_GPIOB, ENABLE); //使能PA,PD端口时钟 - GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE); - - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_15; //LED0-->PA.8 端口配置 - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出 - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO口速度为50MHz - GPIO_Init(GPIOA, &GPIO_InitStructure); //根据设定参数初始化GPIOA.8 - GPIO_SetBits(GPIOA,GPIO_Pin_12 | GPIO_Pin_15); //PA.8 输出高 - - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9; //LED0-->PA.8 端口配置 - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出 - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO口速度为50MHz - GPIO_Init(GPIOB, &GPIO_InitStructure); //根据设定参数初始化GPIOA.8 - GPIO_SetBits(GPIOB,GPIO_Pin_8 | GPIO_Pin_9); //PA.8 输出高 -} - - -void Relay_Beep_Init(void) -{ - GPIO_InitTypeDef GPIO_InitStructure; - - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); //使能PA,PD端口时钟 - - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13; //LED0-->PA.8 端口配置 - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出 - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO口速度为50MHz - GPIO_Init(GPIOB, &GPIO_InitStructure); //根据设定参数初始化GPIOA.8 - GPIO_SetBits(GPIOB,GPIO_Pin_12 | GPIO_Pin_13); //PA.8 输出高 -} -//初始化PB5和PE5为输出口.并使能这两个口的时钟 -//LED IO初始化 +//锟斤拷始锟斤拷PB5锟斤拷PE5为锟斤拷锟斤拷锟.锟斤拷使锟斤拷锟斤拷锟斤拷锟斤拷锟节碉拷时锟斤拷 +//LED IO锟斤拷始锟斤拷 void LED_Init(void) { GPIO_InitTypeDef GPIO_InitStructure; - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); //使能PA,PD端口时钟 + RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOA, ENABLE); //使锟斤拷PA,PD锟剿匡拷时锟斤拷 - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7; //LED0-->PA.8 端口配置 - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出 - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO口速度为50MHz - GPIO_Init(GPIOB, &GPIO_InitStructure); //根据设定参数初始化GPIOA.8 - GPIO_SetBits(GPIOB,GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7); //PA.8 输出高 + GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14; //LED0-->PA.8 锟剿匡拷锟斤拷锟斤拷 + GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //锟斤拷锟斤拷锟斤拷锟 + GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO锟斤拷锟劫讹拷为50MHz + GPIO_Init(GPIOB, &GPIO_InitStructure); //锟斤拷锟斤拷锟借定锟斤拷锟斤拷锟斤拷始锟斤拷GPIOA.8 + GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15; + GPIO_Init(GPIOA, &GPIO_InitStructure); + GPIO_SetBits(GPIOB,GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 ); //PA.8 锟斤拷锟斤拷锟 } diff --git a/stm32/HARDWARE/LED/led.h b/stm32/HARDWARE/LED/led.h index 5483377..c0e2875 100644 --- a/stm32/HARDWARE/LED/led.h +++ b/stm32/HARDWARE/LED/led.h @@ -1,20 +1,27 @@ +/* + * @Author: your name + * @Date: 2022-04-10 10:08:56 + * @LastEditTime: 2022-04-13 03:15:41 + * @LastEditors: Please set LastEditors + * @Description: 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A + * @FilePath: \20220410-IntelligentPiggery\stm32\HARDWARE\LED\led.h + */ #ifndef __LED_H #define __LED_H #include "sys.h" -#define LED_RED PBout(5) // PB5 -#define LED_GREEN PBout(6) // PB6 -#define LED_YELLOW PBout(7) // PB7 +// 绌鸿皟 +#define LED_CONDITIONER PBout(12) // PB5 -#define motor1 PBout(8) // PA10 -#define motor2 PBout(9) // PA11 -#define motor3 PAout(12) // PA12 -#define motor4 PAout(15) // PA15 +// 姘村笜 +#define LED_NAPPE PBout(13) // PB6 -#define Relay PBout(13) // PB13 -#define Beep PBout(12) // PB12 +// 姘存灙 +#define LED_WATER_GUN PBout(14) // PB7 -void LED_Init(void);//初始化 +#define BEEP PAout(15) + +void LED_Init(void);//锟斤拷始锟斤拷 void Relay_Beep_Init(void); void Motor_Init(void); diff --git a/stm32/OBJ/Template.axf b/stm32/OBJ/Template.axf index 1b23cad..8cbd804 100644 Binary files a/stm32/OBJ/Template.axf and b/stm32/OBJ/Template.axf differ diff --git a/stm32/OBJ/Template.build_log.htm b/stm32/OBJ/Template.build_log.htm index 5425ae9..b62bc84 100644 --- a/stm32/OBJ/Template.build_log.htm +++ b/stm32/OBJ/Template.build_log.htm @@ -22,12 +22,35 @@ Dialog DLL: TCM.DLL V1.35.1.0