From 53de825c4c4d8325c02341177f62ab84897eb5ee Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sat, 25 Jul 2026 22:09:43 +0800
Subject: [PATCH] update vscode task.json and add stm32flash tools

---
 ex2.i2c-bitbang/do_clean.bat |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/ex2.i2c-bitbang/do_clean.bat b/ex2.i2c-bitbang/do_clean.bat
new file mode 100644
index 0000000..2ab17eb
--- /dev/null
+++ b/ex2.i2c-bitbang/do_clean.bat
@@ -0,0 +1,39 @@
+@echo off
+setlocal
+
+cd /d "%~dp0"
+
+REM ===== Clean Core (keep main.c) =====
+if exist "Core\Src\main.c" (
+    copy /y "Core\Src\main.c" "main.c" >nul
+    rmdir /s /q "Core" 2>nul
+    mkdir "Core\Src" 2>nul
+    copy /y "main.c" "Core\Src\main.c" >nul
+    del /f /q "main.c"
+)
+
+REM ===== Clean artifacts =====
+call :del_file .mxproject
+call :del_file .cproject
+call :del_file .project
+call :del_file .clangd
+call :del_file *.json
+call :del_file *.ld
+call :del_file *.s
+
+call :del_dir .settings
+call :del_dir Drivers
+call :del_dir Debug
+call :del_dir Release
+call :del_dir build
+call :del_dir cmake
+
+exit /b
+
+:del_file
+if exist "%~1" del /f /q "%~1"
+exit /b
+
+:del_dir
+if exist "%~1\" rmdir /s /q "%~1"
+exit /b
\ No newline at end of file

--
Gitblit v1.10.0