From e1e22d3646fbb374e221301a1584806735b5a6ed Mon Sep 17 00:00:00 2001 From: WangQiang <807319473@qq.com> Date: Mon, 19 Jan 2015 05:25:44 +0000 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=20UTF8=20=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ADC.cpp | 90 +++++++++++++++++++++++++------------------------- ADC.h | 2 +- AT45DB.h | 2 +- CAN.cpp | 2 +- CAN.h | 2 +- DMA.cpp | 2 +- DMA.h | 12 +++---- Delegate.h | 2 +- Enc28j60.cpp | 2 +- Enc28j60.h | 2 +- Flash.cpp | 2 +- Flash.h | 2 +- I2C_Port.cpp | 46 +++++++++++++------------- I2C_Port.h | 2 +- Interrupt.cpp | 2 +- Interrupt.h | 2 +- List.h | 2 +- Memory.cpp | 2 +- Memory.h | 2 +- Port.cpp | 2 +- Port.h | 2 +- RTC.cpp | 2 +- RTC.h | 2 +- SerialPort.cpp | 2 +- SerialPort.h | 2 +- Spi.cpp | 2 +- Sys.h | 2 +- Task.h | 2 +- Time.cpp | 2 +- Timer.cpp | 2 +- Timer.h | 2 +- WatchDog.cpp | 2 +- WatchDog.h | 2 +- nrf24l01.h | 2 +- 34 files changed, 105 insertions(+), 105 deletions(-) diff --git a/ADC.cpp b/ADC.cpp index fa96ef47..6d1d633e 100644 --- a/ADC.cpp +++ b/ADC.cpp @@ -1,23 +1,23 @@ -#include "ADC.h" +#include "ADC.h" #include "sys.h" #include "Interrupt.h" #include "Pin.h" -ADConverter::ADC_Channel _PinList[18]; // ¼ע˳ ADC ÿADC6ͨ -//volatile byte _ADC_ChanelNum[3]={0,0,0}; // ¼ÿADC жٸͨ ->ADC_NbrOfChannel ˲ -volatile int _isChangeEvent=0x00000000; //ʹ18λ ־ͨǷ޸˳ +ADConverter::ADC_Channel _PinList[18]; // 记录注册顺序 三个ADC 每个ADC最多分配6个通道 +//volatile byte _ADC_ChanelNum[3]={0,0,0}; // 记录每个ADC 有多少个通道在线 ->ADC_NbrOfChannel 此参数即可 +volatile int _isChangeEvent=0x00000000; //使用18位 标志通道是否被修改顺序 -static ADC_TypeDef * const g_ADCs[3]= {ADC1,ADC2,ADC3}; // flash +static ADC_TypeDef * const g_ADCs[3]= {ADC1,ADC2,ADC3}; // flash内 -ADC_Stru * adc_IntStrs[3]={NULL,NULL,NULL}; // ADC +ADC_Stru * adc_IntStrs[3]={NULL,NULL,NULL}; // 三个ADC的类 byte ADConverter::isSmall() -{ // ɳ +{ // 避免飞出 if(adc_IntStrs[0] == NULL)return 0; if(adc_IntStrs[1] == NULL)return 1; if(adc_IntStrs[2] == NULL)return 2; - // Ѿжʱ жlineĿ + // 已经有对象的时候 判断line数目 if(adc_IntStrs[1]->adc_intstr.ADC_NbrOfChannel <= adc_IntStrs[2]->adc_intstr.ADC_NbrOfChannel) { if(adc_IntStrs[0]->adc_intstr.ADC_NbrOfChannel <= adc_IntStrs[1]->adc_intstr.ADC_NbrOfChannel)return 0; @@ -66,30 +66,30 @@ ADConverter:: ADConverter(ADC_Channel line) { assert_param( (line < PA10) || ((PC0 <= line) && (line < PC6)) || (0x80 == line)||(line == 0x81) ); ReallyChannel(line); - byte _ADC_group = isSmall(); // ѡȡADC - ADC_TypeDef * _ADC = g_ADCs[_ADC_group]; // ȡöӦADCüĴַ ñ + byte _ADC_group = isSmall(); // 选取负担最轻的ADC + ADC_TypeDef * _ADC = g_ADCs[_ADC_group]; // 取得对象所对应的ADC配置寄存器地址 配置必须参数 - if(adc_IntStrs[_ADC_group] == NULL) //ûгʼ ADC ʼclass + if(adc_IntStrs[_ADC_group] == NULL) //没有初始化 ADC 初始化参数class { - adc_IntStrs[_ADC_group] = new ADC_Stru(_ADC_group); // һADCṹclass ʼɹ캯 -// ADC_InitTypeDef * adc_intstr = & adc_IntStrs[_ADC_group]->adc_intstr; // ȡö - RCC_ADCCLKConfig(RCC_PCLK2_Div6);// ʱӷƵ Ҫʱӽе - ADC_DeInit(_ADC); // λĬֵ + adc_IntStrs[_ADC_group] = new ADC_Stru(_ADC_group); // 申请一个ADC配置类结构体class 初始化参数由构造函数完成 +// ADC_InitTypeDef * adc_intstr = & adc_IntStrs[_ADC_group]->adc_intstr; // 取得对象 + RCC_ADCCLKConfig(RCC_PCLK2_Div6);// 时钟分频数 需要根据时钟进行调整 !!! + ADC_DeInit(_ADC); // 复位到默认值 } - ADC_InitTypeDef * adc_intstr = & adc_IntStrs[_ADC_group]->adc_intstr; // ȡö - ADC_DeInit(_ADC); // ÿ޸ͨʱȸλ // ǷҪ ȷ + ADC_InitTypeDef * adc_intstr = & adc_IntStrs[_ADC_group]->adc_intstr; // 取得对象 + ADC_DeInit(_ADC); // 每次修改通道数的时候先复位 // 是否有需要 不确定 !!! /* ADC_ScanConvMode: - DISABLE ͨģʽ - ENABLE ͨģʽɨģʽ*/ + DISABLE 单通道模式 + ENABLE 多通道模式(扫描模式)*/ if(adc_intstr->ADC_NbrOfChannel == 1) adc_intstr->ADC_ScanConvMode=ENABLE; /* ADC_NbrOfChannel: - ͨ */ - adc_intstr->ADC_NbrOfChannel += 1; //һͨ + 开启通道数 */ + adc_intstr->ADC_NbrOfChannel += 1; //添加一个通道 ADC_Init(ADC1,adc_intstr); - if(line >= Vrefint) ADC_TempSensorVrefintCmd(ENABLE); // PVD ¶ͨ + if(line >= Vrefint) ADC_TempSensorVrefintCmd(ENABLE); // 启用 PVD 和 温度通道 } //bool ADConverter::AddLine(ADC_Channel line) @@ -104,7 +104,7 @@ void ADConverter::OnConfig() } -int ADConverter::Read() // ȡתĽ +int ADConverter::Read() // 读取转换出来的结果 { return adc_IntStrs[_ADC_group]->_AnalogValue[_ChannelNum]; } @@ -115,27 +115,27 @@ ADConverter:: ~ADConverter() ADC_Stru::ADC_Stru(byte ADC_group) { - /* ADC_Mode ģʽ: - ADC_Mode_Independent ģʽ - ADC_Mode_RegInjecSimult ϵͬ עͬģʽ - ADC_Mode_RegSimult_AlterTrig ϵͬ 津ģʽ - ADC_Mode_InjecSimult_FastInterl ͬע ٽģʽ - ADC_Mode_InjecSimult_SlowInterl ͬע ٽģʽ - ADC_Mode_InjecSimult עͬģʽ - ADC_Mode_RegSimult ͬģʽ - ADC_Mode_FastInterl ٽģʽ - ADC_Mode_SlowInterl ٽģʽ - ADC_Mode_AlterTrig 津ģʽ */ + /* ADC_Mode 模式: + ADC_Mode_Independent 独立模式 + ADC_Mode_RegInjecSimult 混合的同步规则 注入同步模式 + ADC_Mode_RegSimult_AlterTrig 混合的同步规则 交替触发模式 + ADC_Mode_InjecSimult_FastInterl 混合同步注入 快速交替模式 + ADC_Mode_InjecSimult_SlowInterl 混合同步注入 慢速交替模式 + ADC_Mode_InjecSimult 注入同步模式 + ADC_Mode_RegSimult 规则同步模式 + ADC_Mode_FastInterl 快速交替模式 + ADC_Mode_SlowInterl 慢速交替模式 + ADC_Mode_AlterTrig 交替触发模式 */ adc_intstr.ADC_Mode = ADC_Mode_Independent; - /* ADC_ScanConvMode תģʽ: - DISABLE ͨģʽ - ENABLE ͨģʽɨģʽ*/ + /* ADC_ScanConvMode 转换模式: + DISABLE 单通道模式 + ENABLE 多通道模式(扫描模式)*/ adc_intstr.ADC_ScanConvMode = DISABLE; - /* ADC_ContinuousConvMode Ƿת - DISABLE - ENABLE */ + /* ADC_ContinuousConvMode 是否连续转换: + DISABLE 单次 + ENABLE 连续*/ adc_intstr.ADC_ContinuousConvMode = ENABLE; - /* ADC_ExternalTrigConv ʽ: + /* ADC_ExternalTrigConv 触发方式: ADC_ExternalTrigConv_T1_CC1 For ADC1 and ADC2 ADC_ExternalTrigConv_T1_CC2 For ADC1 and ADC2 ADC_ExternalTrigConv_T2_CC2 For ADC1 and ADC2 @@ -143,7 +143,7 @@ ADC_Stru::ADC_Stru(byte ADC_group) ADC_ExternalTrigConv_T4_CC4 For ADC1 and ADC2 ADC_ExternalTrigConv_Ext_IT11_TIM8_TRGO For ADC1 and ADC2 ADC_ExternalTrigConv_T1_CC3 For ADC1, ADC2 and ADC3 - ADC_ExternalTrigConv_None For ADC1, ADC2 and ADC3 + ADC_ExternalTrigConv_None 软件 For ADC1, ADC2 and ADC3 ADC_ExternalTrigConv_T3_CC1 For ADC3 only ADC_ExternalTrigConv_T2_CC3 For ADC3 only ADC_ExternalTrigConv_T8_CC1 For ADC3 only @@ -151,11 +151,11 @@ ADC_Stru::ADC_Stru(byte ADC_group) ADC_ExternalTrigConv_T5_CC1 For ADC3 only ADC_ExternalTrigConv_T5_CC3 For ADC3 only*/ adc_intstr.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None; - /* ADC_DataAlign ת뷽ʽ: + /* ADC_DataAlign 转换结果对齐方式: ADC_DataAlign_Right ADC_DataAlign_Left */ adc_intstr.ADC_DataAlign = ADC_DataAlign_Right; /* ADC_NbrOfChannel: - ͨ */ - adc_intstr.ADC_NbrOfChannel = 0; // ʼΪ + 开启通道数 */ + adc_intstr.ADC_NbrOfChannel = 0; // 初始化为零 } diff --git a/ADC.h b/ADC.h index 77550404..61305dab 100644 --- a/ADC.h +++ b/ADC.h @@ -1,4 +1,4 @@ -#ifndef __ADC_H__ +#ifndef __ADC_H__ #define __ADC_H__ #include "Sys.h" diff --git a/AT45DB.h b/AT45DB.h index 2568348c..a37c38dd 100644 --- a/AT45DB.h +++ b/AT45DB.h @@ -1,4 +1,4 @@ -#ifndef __AT45DB_H__ +#ifndef __AT45DB_H__ #define __AT45DB_H__ #include "Sys.h" diff --git a/CAN.cpp b/CAN.cpp index ad2a9a07..87dbe671 100644 --- a/CAN.cpp +++ b/CAN.cpp @@ -1,4 +1,4 @@ -#include "Sys.h" +#include "Sys.h" #include "Port.h" #include "CAN.h" diff --git a/CAN.h b/CAN.h index 346dc834..bb4dfbd4 100644 --- a/CAN.h +++ b/CAN.h @@ -1,4 +1,4 @@ -#ifndef __CAN_H__ +#ifndef __CAN_H__ #define __CAN_H__ #include "Sys.h" diff --git a/DMA.cpp b/DMA.cpp index 4ba6cf6b..6f4466b0 100644 --- a/DMA.cpp +++ b/DMA.cpp @@ -1,4 +1,4 @@ -#include "DMA.h" +#include "DMA.h" bool DMA::Start() { diff --git a/DMA.h b/DMA.h index 58cc035a..a4954040 100644 --- a/DMA.h +++ b/DMA.h @@ -1,4 +1,4 @@ -#ifndef __DMA_H__ +#ifndef __DMA_H__ #define __DMA_H__ #include "Sys.h" @@ -7,18 +7,18 @@ class DMA { private: - byte _index; // ڼʱ0ʼ + byte _index; // 第几个定时器,从0开始 bool _started; public: DMA(byte index); ~DMA(); - int Retry; // ȴԴĬ200 - int Error; // + int Retry; // 等待重试次数,默认200 + int Error; // 错误次数 - bool Start(); // ʼ - bool WaitForStop(); // ֹͣ + bool Start(); // 开始 + bool WaitForStop(); // 停止 //typedef void (*TimerHandler)(Timer* tim, void* param); //void Register(TimerHandler handler, void* param = NULL); diff --git a/Delegate.h b/Delegate.h index 043a542d..03ecbae8 100644 --- a/Delegate.h +++ b/Delegate.h @@ -1,4 +1,4 @@ -#ifndef _Delegate_H_ +#ifndef _Delegate_H_ #define _Delegate_H_ /* diff --git a/Enc28j60.cpp b/Enc28j60.cpp index 61bc4042..d91e40b6 100644 --- a/Enc28j60.cpp +++ b/Enc28j60.cpp @@ -1,4 +1,4 @@ -#include "Enc28j60.h" +#include "Enc28j60.h" #define ENC_DEBUG 0 diff --git a/Enc28j60.h b/Enc28j60.h index 5125ad2f..14e25bb7 100644 --- a/Enc28j60.h +++ b/Enc28j60.h @@ -1,4 +1,4 @@ -#ifndef __Enc28j60_H__ +#ifndef __Enc28j60_H__ #define __Enc28j60_H__ #include "Sys.h" diff --git a/Flash.cpp b/Flash.cpp index 7520876f..714f132a 100644 --- a/Flash.cpp +++ b/Flash.cpp @@ -1,4 +1,4 @@ -#include "Flash.h" +#include "Flash.h" #include #define FLASH_DEBUG 1 diff --git a/Flash.h b/Flash.h index 38424858..875fa9e7 100644 --- a/Flash.h +++ b/Flash.h @@ -1,4 +1,4 @@ -#ifndef __SPI_H__ +#ifndef __SPI_H__ #define __SPI_H__ #include "Sys.h" diff --git a/I2C_Port.cpp b/I2C_Port.cpp index b997cd8c..f52d2d07 100644 --- a/I2C_Port.cpp +++ b/I2C_Port.cpp @@ -1,4 +1,4 @@ -#include "I2C_Port.h" +#include "I2C_Port.h" //static I2C_TypeDef* const g_I2Cs[] = I2CS; //static const Pin g_I2C_Pins_Map[][2] = I2C_PINS_FULLREMAP; @@ -52,7 +52,7 @@ void I2C_Port::GetPin(Pin* acl , Pin* sda ) void I2C_Port::Open() { - // gpio ÿ© + // gpio 复用开漏输出 SCL = new AlternatePort(Pins[0], true); SDA = new AlternatePort(Pins[1], true); @@ -63,7 +63,7 @@ void I2C_Port::Open() //RCC_APB1PeriphResetCmd(sEE_I2C_CLK, DISABLE); #if defined(STM32F0) - // SPIGPIO_AF_0 + // SPI都在GPIO_AF_0分组内 GPIO_PinAFConfig(_GROUP(Pins[0]), _PIN(Pins[0]), GPIO_AF_0); GPIO_PinAFConfig(_GROUP(Pins[1]), _PIN(Pins[1]), GPIO_AF_0); #elif defined(STM32F4) @@ -74,7 +74,7 @@ void I2C_Port::Open() I2C_InitTypeDef i2c; I2C_StructInit(&i2c); - I2C_DeInit(_IIC); // λ + I2C_DeInit(_IIC); // 复位 // I2C_Timing // I2C_AnalogFilter @@ -84,9 +84,9 @@ void I2C_Port::Open() // I2C_Ack // I2C_AcknowledgedAddress - /*i2c.I2C_AnalogFilter = I2C_AnalogFilter_Disable; // ر˲ -// i2c.I2C_DigitalFilter // ˲ ֪ô cr1 8-11λй - i2c.I2C_Mode =I2C_Mode_I2C; // IIC ģʽ + /*i2c.I2C_AnalogFilter = I2C_AnalogFilter_Disable; // 关闭滤波器 +// i2c.I2C_DigitalFilter // 数字滤波器 不知道怎么设置 跟 cr1 的8-11位有关 + i2c.I2C_Mode =I2C_Mode_I2C; // IIC 模式 // i2c.I2C_OwnAddress1 i2c.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit; if(addressLen == ADDR_LEN_10) @@ -125,27 +125,27 @@ bool I2C_Port::WaitForEvent(uint event) int retry = Retry; while(!I2C_CheckEvent(_IIC, event)); { - if(--retry <= 0) return ++Error; // ʱ + if(--retry <= 0) return ++Error; // 超时处理 } return retry > 0; } bool I2C_Port::SetID(byte id, bool tx) { - // ʼ + // 产生起始条件 I2C_GenerateSTART(_IIC, ENABLE); - // ȴACK + // 等待ACK if(!WaitForEvent(I2C_EVENT_MASTER_MODE_SELECT)) return false; if(tx) { - // 豸豸ַ + // 向设备发送设备地址 I2C_Send7bitAddress(_IIC, id, I2C_Direction_Transmitter); - // ȴACK + // 等待ACK if(!WaitForEvent(I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)) return false; } else { - // Ͷַ + // 发送读地址 I2C_Send7bitAddress(_IIC, id, I2C_Direction_Receiver); // EV6 if(!WaitForEvent(I2C_EVENT_MASTER_RECEIVER_MODE_SELECTED)) return 0; @@ -158,37 +158,37 @@ void I2C_Port::Write(byte id, byte addr, byte dat) { if(!SetID(id)) return; - // Ĵַ + // 寄存器地址 I2C_SendData(_IIC, addr); - // ȴACK + // 等待ACK if(!WaitForEvent(I2C_EVENT_MASTER_BYTE_TRANSMITTED)) return; - // + // 发送数据 I2C_SendData(_IIC, dat); - // + // 发送完成 if(!WaitForEvent(I2C_EVENT_MASTER_BYTE_TRANSMITTED)) return; - // ź + // 产生结束信号 I2C_GenerateSTOP(_IIC, ENABLE); } byte I2C_Port::Read(byte id, byte addr) { - // ȴI2C + // 等待I2C while(I2C_GetFlagStatus(_IIC, I2C_FLAG_BUSY)); if(!SetID(id)) return 0; - // ÿEV6 + // 重新设置可以清楚EV6 I2C_Cmd(_IIC, ENABLE); - // Ͷõַ + // 发送读得地址 I2C_SendData(_IIC, addr); // EV8 if(!WaitForEvent(I2C_EVENT_MASTER_BYTE_TRANSMITTED)) return 0; if(!SetID(id, false)) return 0; - // رӦ + // 关闭应答 I2C_AcknowledgeConfig(_IIC, DISABLE); - // ֹͣ + // 停止条件产生 I2C_GenerateSTOP(_IIC, ENABLE); if(!WaitForEvent(I2C_EVENT_MASTER_BYTE_RECEIVED)) return 0; diff --git a/I2C_Port.h b/I2C_Port.h index d620a1f6..9edc878b 100644 --- a/I2C_Port.h +++ b/I2C_Port.h @@ -1,4 +1,4 @@ -#ifndef _I2C_PORT_H_ +#ifndef _I2C_PORT_H_ #define _I2C_PORT_H_ #include "Sys.h" diff --git a/Interrupt.cpp b/Interrupt.cpp index 60f5bcee..7581dcd1 100644 --- a/Interrupt.cpp +++ b/Interrupt.cpp @@ -1,4 +1,4 @@ -#include "Interrupt.h" +#include "Interrupt.h" // GD32全系列无法把向量表映射到RAM,F103只能映射到Flash别的地方 /*#if defined(GD32)// || defined(STM32F4) diff --git a/Interrupt.h b/Interrupt.h index a587571a..a0e304d0 100644 --- a/Interrupt.h +++ b/Interrupt.h @@ -1,4 +1,4 @@ -#ifndef __INTERRUPT_H__ +#ifndef __INTERRUPT_H__ #define __INTERRUPT_H__ #include "Sys.h" diff --git a/List.h b/List.h index 40ac6060..498498a3 100644 --- a/List.h +++ b/List.h @@ -1,4 +1,4 @@ -#ifndef _List_H_ +#ifndef _List_H_ #define _List_H_ #include diff --git a/Memory.cpp b/Memory.cpp index ce7eb672..8d18b230 100644 --- a/Memory.cpp +++ b/Memory.cpp @@ -1,4 +1,4 @@ -#include "Memory.h" +#include "Memory.h" int __fastcall malloc(int a1) { diff --git a/Memory.h b/Memory.h index 0c5f8efa..7da61cbb 100644 --- a/Memory.h +++ b/Memory.h @@ -1,4 +1,4 @@ -#ifndef __Memory_H__ +#ifndef __Memory_H__ #define __Memory_H__ #include "Sys.h" diff --git a/Port.cpp b/Port.cpp index e415e30b..02f6c760 100644 --- a/Port.cpp +++ b/Port.cpp @@ -1,4 +1,4 @@ -#include "Port.h" +#include "Port.h" #if defined(STM32F1) || defined(STM32F4) static const int PORT_IRQns[] = { diff --git a/Port.h b/Port.h index 2f8a89ef..36b5da61 100644 --- a/Port.h +++ b/Port.h @@ -1,4 +1,4 @@ -#ifndef _Port_H_ +#ifndef _Port_H_ #define _Port_H_ #include "Sys.h" diff --git a/RTC.cpp b/RTC.cpp index a3da5a00..b0a82f70 100644 --- a/RTC.cpp +++ b/RTC.cpp @@ -1,4 +1,4 @@ -#include "RTC.h" +#include "RTC.h" diff --git a/RTC.h b/RTC.h index dd4b1f32..aa8295f3 100644 --- a/RTC.h +++ b/RTC.h @@ -1,4 +1,4 @@ -#ifndef __RTC_H__ +#ifndef __RTC_H__ #define __RTC_H__ #include "Sys.h" diff --git a/SerialPort.cpp b/SerialPort.cpp index f1b00890..2d33fe7b 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -1,4 +1,4 @@ -#include "Sys.h" +#include "Sys.h" #include #include "Port.h" diff --git a/SerialPort.h b/SerialPort.h index 2c02cb41..e0ebc202 100644 --- a/SerialPort.h +++ b/SerialPort.h @@ -1,4 +1,4 @@ -#ifndef __SerialPort_H__ +#ifndef __SerialPort_H__ #define __SerialPort_H__ #include "Sys.h" diff --git a/Spi.cpp b/Spi.cpp index efb33e1f..648a2e1d 100644 --- a/Spi.cpp +++ b/Spi.cpp @@ -1,4 +1,4 @@ -#include "Sys.h" +#include "Sys.h" #include "Port.h" #include "Spi.h" diff --git a/Sys.h b/Sys.h index 62e4addd..7bb512d1 100644 --- a/Sys.h +++ b/Sys.h @@ -1,4 +1,4 @@ -#ifndef _Sys_H_ +#ifndef _Sys_H_ #define _Sys_H_ #include diff --git a/Task.h b/Task.h index c73d3960..9513a29f 100644 --- a/Task.h +++ b/Task.h @@ -1,4 +1,4 @@ -#ifndef __Task_H__ +#ifndef __Task_H__ #define __Task_H__ #include "Sys.h" diff --git a/Time.cpp b/Time.cpp index d3de6cd4..bceb2e75 100644 --- a/Time.cpp +++ b/Time.cpp @@ -1,4 +1,4 @@ -#include "Time.h" +#include "Time.h" #define TIME_Completion_IdleValue 0xFFFFFFFFFFFFFFFFull diff --git a/Timer.cpp b/Timer.cpp index 0c038f90..cf7a6779 100644 --- a/Timer.cpp +++ b/Timer.cpp @@ -1,4 +1,4 @@ -#include "Timer.h" +#include "Timer.h" static TIM_TypeDef* const g_Timers[] = TIMS; Timer** Timer::Timers = NULL; diff --git a/Timer.h b/Timer.h index bc4156c3..e43a55c2 100644 --- a/Timer.h +++ b/Timer.h @@ -1,4 +1,4 @@ -#ifndef __Timer_H__ +#ifndef __Timer_H__ #define __Timer_H__ #include "Sys.h" diff --git a/WatchDog.cpp b/WatchDog.cpp index 9b6c9137..283e16ec 100644 --- a/WatchDog.cpp +++ b/WatchDog.cpp @@ -1,4 +1,4 @@ -#include "WatchDog.h" +#include "WatchDog.h" /* 独立看门狗IWDG——有独立时钟(内部低速时钟LSI---40KHz),所以不受系统硬件影响的系统故障探测器。主要用于监视硬件错误。  diff --git a/WatchDog.h b/WatchDog.h index edd1f53b..d19714dc 100644 --- a/WatchDog.h +++ b/WatchDog.h @@ -1,4 +1,4 @@ -#ifndef __WatchDog_H__ +#ifndef __WatchDog_H__ #define __WatchDog_H__ #include "Sys.h" diff --git a/nrf24l01.h b/nrf24l01.h index 5a58cd41..89fe7c80 100644 --- a/nrf24l01.h +++ b/nrf24l01.h @@ -1,4 +1,4 @@ -#ifndef __NRF24L01_H__ +#ifndef __NRF24L01_H__ #define __NRF24L01_H__ #include "Sys.h"