20260106_1:修改部分格式。

This commit is contained in:
2026-01-06 01:56:31 +08:00
parent 2e6795f988
commit 408af68973
9 changed files with 239 additions and 150 deletions

File diff suppressed because one or more lines are too long

View File

@@ -320,7 +320,7 @@
<Group>
<GroupName>User</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@@ -936,7 +936,7 @@
<Group>
<GroupName>System</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@@ -1016,7 +1016,7 @@
<Group>
<GroupName>Drivers</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@@ -1,5 +1,5 @@
#ifndef __DELAY_H__
#define __DELAY_H__
#define __DELAY_H__
#include "stm32f10x_conf.h"
#include "stm32f10x.h"
@@ -9,19 +9,19 @@
#define USE_SYS_TICK 0
#define USE_DWT 1
// 0xE000EDFC DEMCR RW Debug Exception and Monitor Control Register.
/* 0xE000EDFC DEMCR RW Debug Exception and Monitor Control Register. */
#define DEMCR ( *(__IO uint32_t *)0xE000EDFC )
#define TRCENA ( 0x01 << 24) // DEMCR的DWT使能位
#define DBGMCU_CR *(__IO uint32_t *)0xE0042004 // MCU调试模块控制寄存器详细内容参考《stm32中文参考手册》调试支持DBG章节747页
// 0xE0001000 DWT_CTRL RW The Debug Watchpoint and Trace (DWT) unit
/* 0xE0001000 DWT_CTRL RW The Debug Watchpoint and Trace (DWT) unit */
#define DWT_CTRL ( *(__IO uint32_t *)0xE0001000 )
#define DWT_CTRL_CYCCNTENA ( 0x01 << 0 ) // DWT的SYCCNT使能位
// 0xE0001004 DWT_CYCCNT RW Cycle Count register,
/* 0xE0001004 DWT_CYCCNT RW Cycle Count Register */
#define DWT_CYCCNT ( *(__IO uint32_t *)0xE0001004 ) // 显示或设置处理器的周期计数值
//#define DWT_DELAY_mS(mSec) DWT_DELAY_uS(mSec*1000)
// #define DWT_DELAY_mS(mSec) DWT_DELAY_uS(mSec*1000)
typedef struct {
uint8_t ucFacUs;