Skip to content

SDK v1.1.0,add 07_module_xxx #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 41 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,42 +33,46 @@
示例项目文件夹和相应学习阶段如下所示:


| 阶段 | 序号 | 项目实现功能 | 项目文件夹名称 |
| ------------------------ | ---- | :-------------------------------- | ------------------------ |
| 01,入门 RT-Thread 内核 | 01 | RT-Thread 内核学习 | 01_kernel |
| 02,简单外设的使用 | 02 | LED 闪烁例程 | 02_basic_led_blink |
| | 03 | RGB LED 例程 | 02_basic_rgb_led |
| | 04 | 按键输入例程 | 02_basic_key |
| | 05 | 蜂鸣器和 LED 控制例程 | 02_basic_irq_beep |
| | 06 | 红外遥控例程 | 02_basic_ir |
| | 07 | RTC 和 RTC 闹钟的使用例程 | 02_basic_rtc |
| 03,板载外设模块的使用 | 08 | LCD 显示例程 | 03_driver_lcd |
| | 09 | AHT10 温湿度传感器例程 | 03_driver_temp_humi |
| | 10 | AP3216C 接近与光强传感器例程 | 03_driver_als_ps |
| | 11 | ICM20608 六轴传感器例程 | 03_driver_axis |
| | 12 | CAN 通信例程 | 03_driver_can |
| | 13 | LED MATRIX 闪烁例程 | 03_driver_led_matrix |
| 04,RT-Thread 组件的使用 | 14 | USB 鼠标例程 | 04_component_usb_mouse |
| | 15 | TF 卡文件系统例程 | 04_component_fs_tf_card |
| | 16 | 低功耗例程 | 04_component_pm |
| | 17 | Flash 分区管理例程 | 04_component_fal |
| | 18 | KV 参数存储例程 | 04_component_kv |
| | 19 | SPI Flash 文件系统例程 | 04_component_fs_flash |
| 05,IoT 相关组件的使用 | 20 | WiFi 管理例程 | 05_iot_wifi_manager |
| | 21 | MQTT 协议通信例程 | 05_iot_mqtt |
| | 22 | HTTP Client 功能实现例程 | 05_iot_http_client |
| | 23 | MEMBEDTLS 例程 | 05_iot_mbedtls |
| | 24 | Ymodem 协议固件升级例程 | 05_iot_ota_ymodem |
| | 25 | HTTP 协议固件升级例程 | 05_iot_ota_http |
| | 26 | 网络小工具集使用例程 | 05_iot_netutils |
| | 27 | 中国移动 OneNET 云平台接入例程 | 05_iot_cloud_onenet |
| | 28 | 阿里云物联网平台接入例程 | 05_iot_cloud_ali_iotkit |
| | 29 | 使用 Web 服务器组件:WebNet | 05_iot_web_server |
| 06,综合 Demo 学习 | 30 | LVGL 例程 | 06_demo_lvgl |
| | 31 | MicroPython 例程 | 06_demo_micropython |
| | 32 | 板载 LED matrix 和 RS485 驱动例程 | 06_demo_rs485_led_matrix |
| | 33 | nes 模拟器实验 | 06_demo_nes_simulator |
| | 34 | 开发板综合 Demo(出厂 Demo) | 06_demo_factory |
| 阶段 | 序号 | 项目实现功能 | 项目文件夹名称 |
| ------------------------ | ---- | :-------------------------------- | -------------------------- |
| 01,入门 RT-Thread 内核 | 01 | RT-Thread 内核学习 | 01_kernel |
| 02,简单外设的使用 | 02 | LED 闪烁例程 | 02_basic_led_blink |
| | 03 | RGB LED 例程 | 02_basic_rgb_led |
| | 04 | 按键输入例程 | 02_basic_key |
| | 05 | 蜂鸣器和 LED 控制例程 | 02_basic_irq_beep |
| | 06 | 红外遥控例程 | 02_basic_ir |
| | 07 | RTC 和 RTC 闹钟的使用例程 | 02_basic_rtc |
| 03,板载外设模块的使用 | 08 | LCD 显示例程 | 03_driver_lcd |
| | 09 | AHT10 温湿度传感器例程 | 03_driver_temp_humi |
| | 10 | AP3216C 接近与光强传感器例程 | 03_driver_als_ps |
| | 11 | ICM20608 六轴传感器例程 | 03_driver_axis |
| | 12 | CAN 通信例程 | 03_driver_can |
| | 13 | LED MATRIX 闪烁例程 | 03_driver_led_matrix |
| 04,RT-Thread 组件的使用 | 14 | USB 鼠标例程 | 04_component_usb_mouse |
| | 15 | TF 卡文件系统例程 | 04_component_fs_tf_card |
| | 16 | 低功耗例程 | 04_component_pm |
| | 17 | Flash 分区管理例程 | 04_component_fal |
| | 18 | KV 参数存储例程 | 04_component_kv |
| | 19 | SPI Flash 文件系统例程 | 04_component_fs_flash |
| 05,IoT 相关组件的使用 | 20 | WiFi 管理例程 | 05_iot_wifi_manager |
| | 21 | MQTT 协议通信例程 | 05_iot_mqtt |
| | 22 | HTTP Client 功能实现例程 | 05_iot_http_client |
| | 23 | MEMBEDTLS 例程 | 05_iot_mbedtls |
| | 24 | Ymodem 协议固件升级例程 | 05_iot_ota_ymodem |
| | 25 | HTTP 协议固件升级例程 | 05_iot_ota_http |
| | 26 | 网络小工具集使用例程 | 05_iot_netutils |
| | 27 | 中国移动 OneNET 云平台接入例程 | 05_iot_cloud_onenet |
| | 28 | 阿里云物联网平台接入例程 | 05_iot_cloud_ali_iotkit |
| | 29 | 使用 Web 服务器组件:WebNet | 05_iot_web_server |
| 06,综合 Demo 学习 | 30 | LVGL 例程 | 06_demo_lvgl |
| | 31 | MicroPython 例程 | 06_demo_micropython |
| | 32 | 板载 LED matrix 和 RS485 驱动例程 | 06_demo_rs485_led_matrix |
| | 33 | nes 模拟器实验 | 06_demo_nes_simulator |
| | 34 | 开发板综合 Demo(出厂 Demo) | 06_demo_factory |
| 07,教育套件对应模块例程 | 35 | 矩阵键盘模块例程 | 07_module_key_matrix |
| | 36 | ENC28J60 网络模块例程 | 07_module_spi_eth_enc28j60 |
| | 37 | 超声波测距模块例程 | 07_module_ultrasonic_sr04 |
| | 38 | ws2812 led 灯带例程 | 07_module_ws2812_led |

## 使用

Expand All @@ -83,7 +87,7 @@ sdk-bsp-stm32f407-spark 支持 RT-Thread Studio 和 MDK 开发。

为了避免 SDK 在持续更新中,每一个 `projects` 都创建一份 `rt-thread` 文件夹 和 `libraries` 文件夹导致的 SDK 越来越臃肿,所以这些通用文件夹被单独提取了出来。这样就会导致直接打开 `MDK` 的工程编译会提示缺少上述两个文件夹的文件,我们使用如下步骤解决这个问题:

1. 双击某个 `project` 目录下的 `mklinks.bat` 文件,或者使用 [Env](https://club.rt-thread.org/ask/question/5699.html) 工具执行 mklink 命令,分别为 `rt-thread` 及 `libraries` 文件创建符号链接。
1. 双击某个 `project` 目录下的 `mklinks.bat` 文件,或者使用 [Env](https://club.rt-thread.org/ask/question/5699.html) 工具执行 mklinks.bat 命令,分别为 `rt-thread` 及 `libraries` 文件创建符号链接。
2. 查看目录下是否有 `rt-thread` 和 `libraries` 的文件夹图标。
3. 使用 [Env](https://club.rt-thread.org/ask/question/5699.html) 工具执行 scons --target=mdk5 更新 MDK5 工程文件。

Expand Down
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions libraries/Board_Drivers/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ if GetDepend(['BSP_USING_ONBOARD_LED_MATRIX']):
src += Glob('led_matrix/drv_matrix_led.c')
path += [cwd + '/led_matrix']

if GetDepend(['BSP_USING_NEOPIXEL']):
src += Glob('led_matrix/drv_neo_pixel.c')

if GetDepend(['BSP_USING_EASYFLASH']):
src += Glob('ef_fal_port.c')

Expand Down
5 changes: 2 additions & 3 deletions libraries/Board_Drivers/drv_enc28j60.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
* 2018-08-27 ZYLX the first version
*/

#include <drivers/pin.h>
#include <rtdevice.h>
#include <enc28j60.h>
#include "drv_spi.h"
#include "board.h"

#define PIN_NRF_IRQ GET_PIN(E,2)


int enc28j60_init(void)
{
__HAL_RCC_GPIOD_CLK_ENABLE();
Expand All @@ -26,7 +25,7 @@ int enc28j60_init(void)

/* init interrupt pin */
rt_pin_mode(PIN_NRF_IRQ, PIN_MODE_INPUT_PULLUP);
rt_pin_attach_irq(PIN_NRF_IRQ, PIN_IRQ_MODE_FALLING, (void(*)(void*))enc28j60_isr, RT_NULL);
rt_pin_attach_irq(PIN_NRF_IRQ, PIN_IRQ_MODE_FALLING, (void(*)(void *))enc28j60_isr, RT_NULL);
rt_pin_irq_enable(PIN_NRF_IRQ, PIN_IRQ_ENABLE);

return 0;
Expand Down
Loading