From 6ccf1b34b2e172c61c6af797f6d42eb69e7de81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 11:21:23 +0300 Subject: [PATCH 01/12] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b2e948bd..fc709c69 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/anilberg/Arduino-For-Keil/blob/master/README.en.md) + # Arduino for Keil ## 1.概要 >这是一个轻量级的Arduino框架,使**STM32**系列单片机兼容Arduino语法,在Keil上进行编译调试。 From 68127e47edc88c30de8b5e9f8aabe0e88c59a7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 11:21:25 +0300 Subject: [PATCH 02/12] Create README.en.md --- README.en.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 README.en.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 00000000..48689f93 --- /dev/null +++ b/README.en.md @@ -0,0 +1,63 @@ +[![ch](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/jonatasemidio/multilanguage-readme-pattern/blob/master/README.md) + +# Arduino for Keil +## 1.概要 +>这是一个轻量级的Arduino框架,使**STM32**系列单片机兼容Arduino语法,在Keil上进行编译调试。 + +相对于传统开发方式的优势: +> +> 1.与Arduino共用[生态](https://github.com/topics/arduino-library),降低学习门槛,简化开发过程。 +> +> 2.关键部分使用了 **寄存器+宏** 的优化方式,减少函数调用开销,提升运行效率。 +> +> 3.简化的Arduino框架,相对[stm32duino](https://github.com/stm32duino)与HAL库,拥有更小的代码体积、更快的编译和执行速度。 + +## 2.使用 +> 底层基于 **AT32/STM32标准外设库** 二次封装,安装之后才能正常编译,下载链接位于下方。 + +[AT32F403A标准外设库](http://www.arterytek.com/download/Pack_Keil_AT32F4xx_CH_V1.3.4.zip) + +[AT32F43x/421标准外设库](https://www.arterytek.com/download/PACK/Keil5_AT32MCU_AddOn_V2.1.7.zip) + +[STM32F0xx标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32F0xx_DFP.1.0.1.pack) + +[STM32F10x标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32F1xx_DFP.1.1.0.pack) + +[STM32F3xx标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32F3xx_DFP.1.2.0.pack) + +[STM32F4xx标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32F4xx_DFP.1.0.8.pack) + +[STM32L1xx标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32L1xx_DFP.1.0.2.pack) + +**注意** 如果您已经安装了更高版本的pack,需要使用keil自带的包管理器将高版本的pack进行Remove + +>一般用法可以直接参照[Arduino语法](https://www.arduino.cc/reference/en/)。 +> +>高级用法参考[Example](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/master/Example)内的示例。 +> +>第三方库移植参考[第三方库移植示例](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library)。 + +支持与寄存器和标准外设库的函数混用,**保证开发的灵活性**: +```C +void setup() +{ + pinMode(PA0,OUTPUT); //使用Arduino函数将配置PA0为输出模式 +} + +void loop() +{ + GPIOA->BSRR = GPIO_Pin_0; //使用寄存器将PA0电平拉高 + delay(1000); //延时一秒 + GPIO_ResetBits(GPIOA, GPIO_Pin_0); //使用标准外设库的函数将PA0电平拉低 + delay(1000); //延时一秒 +} +``` + +## 3.系统框架 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/Framework.png) + +## 4.注意 + 1.请不要删除"main.cpp"中的main函数。 + 2.添加第三方库函数的时候要加入完整的路径,以及.cpp源文件. + 3.由于平台的不同,有的函数库可能要进行修改才能正常编译,具体修改方式请按照编译器的提示,或者可以提交Issues。 + From 8a97876cf74a49f9ba5905e3d464d2f7c165f99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:13:13 +0300 Subject: [PATCH 03/12] Update README.en.md --- README.en.md | 61 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/README.en.md b/README.en.md index 48689f93..dde1a406 100644 --- a/README.en.md +++ b/README.en.md @@ -1,63 +1,62 @@ [![ch](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/jonatasemidio/multilanguage-readme-pattern/blob/master/README.md) # Arduino for Keil -## 1.概要 ->这是一个轻量级的Arduino框架,使**STM32**系列单片机兼容Arduino语法,在Keil上进行编译调试。 +## 1. Outline +>This is a lightweight Arduino framework that makes STM32 series microcontrollers compatible with Arduino syntax, allowing for compilation and debugging in Keil. -相对于传统开发方式的优势: +Advantages compared to traditional development methods: > -> 1.与Arduino共用[生态](https://github.com/topics/arduino-library),降低学习门槛,简化开发过程。 +> 1.Shares the [ecosystem](https://github.com/topics/arduino-library) with Arduino, reducing the learning curve and simplifying the development process. > -> 2.关键部分使用了 **寄存器+宏** 的优化方式,减少函数调用开销,提升运行效率。 +> 2.Key parts use an optimization approach of **registers + macros**, reducing function call overhead and improving runtime efficiency. > -> 3.简化的Arduino框架,相对[stm32duino](https://github.com/stm32duino)与HAL库,拥有更小的代码体积、更快的编译和执行速度。 +> 3.The simplified Arduino framework has a smaller code size and faster compilation and execution speed compared to [stm32duino](https://github.com/stm32duino) and the HAL library. -## 2.使用 -> 底层基于 **AT32/STM32标准外设库** 二次封装,安装之后才能正常编译,下载链接位于下方。 +## 2. To use +> The underlying layer is based on the **AT32/STM32 Standard Peripheral Library** for secondary encapsulation, which must be installed for proper compilation. The download link is provided below. -[AT32F403A标准外设库](http://www.arterytek.com/download/Pack_Keil_AT32F4xx_CH_V1.3.4.zip) +[AT32F403A Standard Peripheral Library](http://www.arterytek.com/download/Pack_Keil_AT32F4xx_CH_V1.3.4.zip) -[AT32F43x/421标准外设库](https://www.arterytek.com/download/PACK/Keil5_AT32MCU_AddOn_V2.1.7.zip) +[AT32F43x/421 Standard Peripheral Library](https://www.arterytek.com/download/PACK/Keil5_AT32MCU_AddOn_V2.1.7.zip) -[STM32F0xx标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32F0xx_DFP.1.0.1.pack) +[STM32F0xx Standard Peripheral Library](https://keilpack.azureedge.net/pack/Keil.STM32F0xx_DFP.1.0.1.pack) -[STM32F10x标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32F1xx_DFP.1.1.0.pack) +[STM32F10x Standard Peripheral Library](https://keilpack.azureedge.net/pack/Keil.STM32F1xx_DFP.1.1.0.pack) -[STM32F3xx标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32F3xx_DFP.1.2.0.pack) +[STM32F3xx Standard Peripheral Library](https://keilpack.azureedge.net/pack/Keil.STM32F3xx_DFP.1.2.0.pack) -[STM32F4xx标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32F4xx_DFP.1.0.8.pack) +[STM32F4xx Standard Peripheral Library](https://keilpack.azureedge.net/pack/Keil.STM32F4xx_DFP.1.0.8.pack) -[STM32L1xx标准外设库](https://keilpack.azureedge.net/pack/Keil.STM32L1xx_DFP.1.0.2.pack) +[STM32L1xx Standard Peripheral Library](https://keilpack.azureedge.net/pack/Keil.STM32L1xx_DFP.1.0.2.pack) -**注意** 如果您已经安装了更高版本的pack,需要使用keil自带的包管理器将高版本的pack进行Remove +**Note:** If you have already installed a higher version of the pack, you need to use the package manager provided by Keil to remove the higher version of the pack. ->一般用法可以直接参照[Arduino语法](https://www.arduino.cc/reference/en/)。 +>The general usage can be directly referenced from [Arduino syntax](https://www.arduino.cc/reference/en/)。 > ->高级用法参考[Example](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/master/Example)内的示例。 +>Advanced usage can be referenced in [Example](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/master/Example)内的示例。 > ->第三方库移植参考[第三方库移植示例](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library)。 +>For third-party library porting, refer to [Third-Party Library Porting Example](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library)。 -支持与寄存器和标准外设库的函数混用,**保证开发的灵活性**: +Supports the mixed use of registers and functions from the standard peripheral library, **ensuring development flexibility**: ```C void setup() { - pinMode(PA0,OUTPUT); //使用Arduino函数将配置PA0为输出模式 + pinMode(PA0,OUTPUT); //Use the Arduino function to configure PA0 as an output mode } void loop() { - GPIOA->BSRR = GPIO_Pin_0; //使用寄存器将PA0电平拉高 - delay(1000); //延时一秒 - GPIO_ResetBits(GPIOA, GPIO_Pin_0); //使用标准外设库的函数将PA0电平拉低 - delay(1000); //延时一秒 + GPIOA->BSRR = GPIO_Pin_0; //Use the register to pull the PA0 level high + delay(1000); //Delay for one second + GPIO_ResetBits(GPIOA, GPIO_Pin_0); //Use the functions from the standard peripheral library to pull the PA0 level low + delay(1000); //Delay for one second } ``` -## 3.系统框架 +## 3. System Framework ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/Framework.png) -## 4.注意 - 1.请不要删除"main.cpp"中的main函数。 - 2.添加第三方库函数的时候要加入完整的路径,以及.cpp源文件. - 3.由于平台的不同,有的函数库可能要进行修改才能正常编译,具体修改方式请按照编译器的提示,或者可以提交Issues。 - +## 4. Notice + 1.Please do not delete the main function in "main.cpp". + 2.When adding third-party library functions, be sure to include the full path and the corresponding .cpp source file. + 3.Due to platform differences, some library functions may need modifications to compile correctly. Please follow the compiler's suggestions for specific changes, or you can submit Issues for assistance. From 46e843cde7310e7a9e85b932f43a44991cae79ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:13:51 +0300 Subject: [PATCH 04/12] Update README.en.md --- README.en.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.en.md b/README.en.md index dde1a406..93469581 100644 --- a/README.en.md +++ b/README.en.md @@ -31,11 +31,11 @@ Advantages compared to traditional development methods: **Note:** If you have already installed a higher version of the pack, you need to use the package manager provided by Keil to remove the higher version of the pack. ->The general usage can be directly referenced from [Arduino syntax](https://www.arduino.cc/reference/en/)。 +>The general usage can be directly referenced from [Arduino syntax](https://www.arduino.cc/reference/en/) > ->Advanced usage can be referenced in [Example](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/master/Example)内的示例。 +>Advanced usage can be referenced in [Example](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/master/Example) > ->For third-party library porting, refer to [Third-Party Library Porting Example](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library)。 +>For third-party library porting, refer to [Third-Party Library Porting Example](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library) Supports the mixed use of registers and functions from the standard peripheral library, **ensuring development flexibility**: ```C From 8f43bb33fcb09223d8b637f262aa4eb47d67c629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:15:17 +0300 Subject: [PATCH 05/12] Update README.en.md --- README.en.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.en.md b/README.en.md index 93469581..10ad7c73 100644 --- a/README.en.md +++ b/README.en.md @@ -1,4 +1,4 @@ -[![ch](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/jonatasemidio/multilanguage-readme-pattern/blob/master/README.md) +[![ch](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/anilberg/Arduino-For-Keil/blob/master/README.md) # Arduino for Keil ## 1. Outline @@ -31,11 +31,11 @@ Advantages compared to traditional development methods: **Note:** If you have already installed a higher version of the pack, you need to use the package manager provided by Keil to remove the higher version of the pack. ->The general usage can be directly referenced from [Arduino syntax](https://www.arduino.cc/reference/en/) +>The general usage can be directly referenced from [Arduino syntax](https://www.arduino.cc/reference/en/). > ->Advanced usage can be referenced in [Example](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/master/Example) +>Advanced usage can be referenced in [Example](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/master/Example). > ->For third-party library porting, refer to [Third-Party Library Porting Example](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library) +>For third-party library porting, refer to [Third-Party Library Porting Example](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library). Supports the mixed use of registers and functions from the standard peripheral library, **ensuring development flexibility**: ```C From 23481e9256b66dc1a807821306251f48bb7bb2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:15:56 +0300 Subject: [PATCH 06/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc709c69..1334a11d 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ void loop() ``` ## 3.系统框架 -![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/Framework.png) +![image](https://github.com/anilberg/Arduino-For-Keil/blob/master/Framework.png) ## 4.注意 1.请不要删除"main.cpp"中的main函数。 From 722b86aec625ce49cb90b64a64c7754f74aca328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:17:38 +0300 Subject: [PATCH 07/12] Update README.en.md --- README.en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.en.md b/README.en.md index 10ad7c73..dacc4e42 100644 --- a/README.en.md +++ b/README.en.md @@ -1,4 +1,4 @@ -[![ch](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/anilberg/Arduino-For-Keil/blob/master/README.md) +[![ch](https://img.shields.io/badge/lang-ch-red.svg)](https://github.com/anilberg/Arduino-For-Keil/blob/master/README.md) # Arduino for Keil ## 1. Outline From 50feb34abea8100fc151d64ac828d164d56c6908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:19:40 +0300 Subject: [PATCH 08/12] Update README.md --- How to use Arduino library/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/How to use Arduino library/README.md b/How to use Arduino library/README.md index f03471ba..6f549605 100644 --- a/How to use Arduino library/README.md +++ b/How to use Arduino library/README.md @@ -1,3 +1,5 @@ +[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/anilberg/Arduino-For-Keil/tree/main/How%20to%20use%20Arduino%20library/README.en.md) + ## 第三方库移植示例 * 1.从Arduino的安装库的文件夹中找到要调用的第三方库 ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/1.png) From f74b0affe3fe876ac2cbd2382b3628bcecf90551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:19:42 +0300 Subject: [PATCH 09/12] Create README.en.md --- How to use Arduino library/README.en.md | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 How to use Arduino library/README.en.md diff --git a/How to use Arduino library/README.en.md b/How to use Arduino library/README.en.md new file mode 100644 index 00000000..f222b376 --- /dev/null +++ b/How to use Arduino library/README.en.md @@ -0,0 +1,35 @@ +[![ch](https://img.shields.io/badge/lang-ch-red.svg)](https://github.com/anilberg/Arduino-For-Keil/tree/main/How%20to%20use%20Arduino%20library/README.md) + +## Example of Porting a Third-Party Library +* 1.从Arduino的安装库的文件夹中找到要调用的第三方库 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/1.png) + +* 2.将刚才找到的第三方库放到Keil工程模板的Libraries文件夹内 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/2.png) + +* 3.启动Keil工程 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/3.png) + +* 4.将第三方库的源代码文件添加到Keil的工程组 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/4.png) + +* 5.找到第三方库文件夹 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/5.png) + +* 6.添加路径 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/6.png) + +* 7.找到第三方库自带的示例程序(一般位于第三方库目录下的examples内) +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/7.png) + +* 8.复制示例程序 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/8.png) + +* 9.将示例程序复制到Keil工程模板的main.cpp里,替换 setup() 和 loop() 函数 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/9.png) + +* 10.修改示例程序里的引脚定义为STM32的引脚 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/10.png) + +* 11.点击编译,如果编译无错误表示移植成功 +![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/11.png) From 10d76ea547ea5e1ec761cab23a275bd37d9ab3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:24:04 +0300 Subject: [PATCH 10/12] Update README.md --- How to use Arduino library/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/How to use Arduino library/README.md b/How to use Arduino library/README.md index 6f549605..a62d7289 100644 --- a/How to use Arduino library/README.md +++ b/How to use Arduino library/README.md @@ -1,6 +1,6 @@ [![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/anilberg/Arduino-For-Keil/tree/main/How%20to%20use%20Arduino%20library/README.en.md) -## 第三方库移植示例 +## Example of Porting a Third-Party Library * 1.从Arduino的安装库的文件夹中找到要调用的第三方库 ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/1.png) From 365393a83ce5f917b0547e79ea98ba4740d070a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:24:06 +0300 Subject: [PATCH 11/12] Update README.en.md --- How to use Arduino library/README.en.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/How to use Arduino library/README.en.md b/How to use Arduino library/README.en.md index f222b376..c2f9d1cb 100644 --- a/How to use Arduino library/README.en.md +++ b/How to use Arduino library/README.en.md @@ -1,35 +1,35 @@ [![ch](https://img.shields.io/badge/lang-ch-red.svg)](https://github.com/anilberg/Arduino-For-Keil/tree/main/How%20to%20use%20Arduino%20library/README.md) ## Example of Porting a Third-Party Library -* 1.从Arduino的安装库的文件夹中找到要调用的第三方库 +* 1. Find the third-party library you want to call from the Arduino installed libraries folder. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/1.png) -* 2.将刚才找到的第三方库放到Keil工程模板的Libraries文件夹内 +* 2. Place the third-party library you just found into the Libraries folder within the Keil project template. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/2.png) -* 3.启动Keil工程 +* 3. Start the Keil project. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/3.png) -* 4.将第三方库的源代码文件添加到Keil的工程组 +* 4. Add the source code files of the third-party library to the Keil project group. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/4.png) -* 5.找到第三方库文件夹 +* 5. Find the folder of the third-party library. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/5.png) -* 6.添加路径 +* 6. Add the path. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/6.png) -* 7.找到第三方库自带的示例程序(一般位于第三方库目录下的examples内) +* 7. Locate the example programs that come with the third-party library, usually found in the examples folder within the library directory. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/7.png) -* 8.复制示例程序 +* 8. Copy the example programs. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/8.png) -* 9.将示例程序复制到Keil工程模板的main.cpp里,替换 setup() 和 loop() 函数 +* 9. Replace the setup() and loop() functions in your main.cpp file of the Keil project template with the copied example program. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/9.png) -* 10.修改示例程序里的引脚定义为STM32的引脚 +* 10. Modify the pin definitions in the example program to match the STM32 pins. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/10.png) -* 11.点击编译,如果编译无错误表示移植成功 +* 11. Click "Compile." If there are no errors during compilation, it indicates that the porting was successful. ![image](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/How%20to%20use%20Arduino%20library/11.png) From c44831aaa02e271ef8fb31bc6029592154daef9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20Berk?= Date: Mon, 24 Feb 2025 12:31:23 +0300 Subject: [PATCH 12/12] Change URLs --- How to use Arduino library/README.en.md | 2 +- How to use Arduino library/README.md | 2 +- README.en.md | 2 +- README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/How to use Arduino library/README.en.md b/How to use Arduino library/README.en.md index c2f9d1cb..9f36dc27 100644 --- a/How to use Arduino library/README.en.md +++ b/How to use Arduino library/README.en.md @@ -1,4 +1,4 @@ -[![ch](https://img.shields.io/badge/lang-ch-red.svg)](https://github.com/anilberg/Arduino-For-Keil/tree/main/How%20to%20use%20Arduino%20library/README.md) +[![ch](https://img.shields.io/badge/lang-ch-red.svg)](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/main/How%20to%20use%20Arduino%20library/README.md) ## Example of Porting a Third-Party Library * 1. Find the third-party library you want to call from the Arduino installed libraries folder. diff --git a/How to use Arduino library/README.md b/How to use Arduino library/README.md index a62d7289..9c7a7449 100644 --- a/How to use Arduino library/README.md +++ b/How to use Arduino library/README.md @@ -1,4 +1,4 @@ -[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/anilberg/Arduino-For-Keil/tree/main/How%20to%20use%20Arduino%20library/README.en.md) +[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/FASTSHIFT/Arduino-For-Keil/tree/main/How%20to%20use%20Arduino%20library/README.en.md) ## Example of Porting a Third-Party Library * 1.从Arduino的安装库的文件夹中找到要调用的第三方库 diff --git a/README.en.md b/README.en.md index dacc4e42..9d7acb22 100644 --- a/README.en.md +++ b/README.en.md @@ -1,4 +1,4 @@ -[![ch](https://img.shields.io/badge/lang-ch-red.svg)](https://github.com/anilberg/Arduino-For-Keil/blob/master/README.md) +[![ch](https://img.shields.io/badge/lang-ch-red.svg)](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/README.md) # Arduino for Keil ## 1. Outline diff --git a/README.md b/README.md index 1334a11d..f7bef35c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/anilberg/Arduino-For-Keil/blob/master/README.en.md) +[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/FASTSHIFT/Arduino-For-Keil/blob/master/README.en.md) # Arduino for Keil ## 1.概要