Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
Signed-off-by: iotah <[email protected]>
  • Loading branch information
IotaHydrae committed Sep 26, 2024
1 parent da61430 commit 7f89956
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 10 deletions.
47 changes: 39 additions & 8 deletions content/docs/env-setup/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ seo:

我们会在下个章节中讨论编译及配置问题。

## 基于PICO-SDK的
## 基于我们开发的版本

### 裸机版本
### 裸机

该版本完全基于官方 Pico C-SDK 开发,仅添加了LVGL的支持,所以如果您想要在本项目基础上进行原生二次开发,可以选择该裸机工程。

Expand All @@ -42,7 +42,7 @@ git clone https://gitee.com/embeddedboys/pico_dm_qd3503728_noos
git clone https://github.com/embeddedboys/pico_dm_qd3503728_noos
```

### FreeRTOS 版本
### FreeRTOS

与裸机版本不同的是,我们又在其上面添加了FreeRTOS的支持,同时该工程支持SMP,可同时使用RP2040的两个核心处理任务,如果您惯用FreeRTOS开发,可以选择本工程。

Expand Down Expand Up @@ -102,13 +102,16 @@ git clone https://github.com/embeddedboys/pico_dm_8080_template
我们也会及时更新镜像链接版本。
{{< /callout >}}

## 其他版本
## 基于社区开源项目

😋 我们正在开发中,包括但不限于如下工程:

- [x] Micropython
- [ ] Arduino
- [x] Arduino
- [ ] embedded_graphics (Rust)
- [ ] Slint (Rust)
- [ ] Nuttx
- [ ] zephyr

### Micropython

Expand Down Expand Up @@ -398,6 +401,34 @@ V9.0: [https://sim.lvgl.io/v9.0/micropython/ports/webassembly/index.html](https:
可在[lv_mpy_examples_v8](https://github.com/uraich/lv_mpy_examples_v8)这个仓库查看v8.3版本的lvgl micropython例子,因为v9版本较新,暂时没有例程参考。
### Arduino
(开发中)开发进度:
- [x] 研究使用platformio Arduino开发rp2040程序
- [ ] 搭建工程
我们已经添加了一个初步支持的Arduino移植,可查看如下仓库
[https://github.com/embeddedboys/pico_dm_qd3503728_arduino](https://github.com/embeddedboys/pico_dm_qd3503728_arduino)
这部分的文档还在整理中,可先查看如上仓库的 readme 简易说明
### embedded_graphics (Rust)
[https://github.com/embedded-graphics/embedded-graphics](https://github.com/embedded-graphics/embedded-graphics)
`embedded_graphics` 是一款专注于内存受限的嵌入式设备的二维图形库。
已提上日程,开发中。。。
### Slint (Rust)
[https://slint.dev/](https://slint.dev/)
已提上日程,开发中。。。
### Nuttx
[https://nuttx.apache.org/docs/latest/platforms/arm/rp2040/index.html](https://nuttx.apache.org/docs/latest/platforms/arm/rp2040/index.html)
已提上日程,调研中。。。
### Zephyr
[https://docs.zephyrproject.org/latest/boards/raspberrypi/rpi_pico/doc/index.html](https://docs.zephyrproject.org/latest/boards/raspberrypi/rpi_pico/doc/index.html)
已提上日程,调研中。。。
56 changes: 54 additions & 2 deletions content/docs/porting/8080-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,26 @@ int tft_driver_init(void)
#endif
```
**3. 在src/CMakeLists.txth中添加新的显示屏驱动**
**3. 在src/cmake 目录下新建一个ili9488.cmake 文件**
在此处定义需要的变量,这些变量会覆盖`src/CMakeLists.txt`中的默认属性
```cmake
set(LCD_PIN_DB_BASE 0) # 8080 LCD data bus base pin
set(LCD_PIN_DB_COUNT 16) # 8080 LCD data bus pin count
set(LCD_PIN_CS 29) # 8080 LCD chip select pin
set(LCD_PIN_WR 19) # 8080 LCD write pin
set(LCD_PIN_RS 20) # 8080 LCD register select pin
set(LCD_PIN_RD 18) # 8080 LCD read pin
set(LCD_PIN_RST 22) # 8080 LCD reset pin
set(LCD_PIN_BL 28) # 8080 LCD backlight pin
set(LCD_HOR_RES 480)
set(LCD_VER_RES 320)
set(DISP_OVER_PIO 1) # 1: PIO, 0: GPIO
set(PIO_USE_DMA 1) # 1: use DMA, 0: not use DMA
set(I80_BUS_WR_CLK_KHZ 50000)
```

**4. 在src/CMakeLists.txth中添加新的显示屏驱动**
```cmake
set(LCD_DRV_USE_ILI9488 0)
Expand All @@ -85,4 +104,37 @@ file(GLOB_RECURSE COMMON_SOURCES
target_compile_definitions(${PROJECT_NAME} PUBLIC LCD_DRV_USE_ILI9488=${LCD_DRV_USE_ILI9488})
```

## 触摸屏
## 触摸屏

**1. 新建一个名为ft6236.c 的文件**
实现一个indev_spec结构体对象
```c
static struct indev_spec ft6236 = {
.name = "ft6236",
.type = INDEV_TYPE_POINTER,

.i2c = {
.addr = FT6236_ADDR,
.master = i2c1,
.speed = FT6236_DEF_SPEED,
.pin_scl = FT6236_PIN_SCL,
.pin_sda = FT6236_PIN_SDA,
},

.x_res = TOUCH_X_RES,
.y_res = TOUCH_Y_RES,

// .pin_irq = FT6236_PIN_IRQ,
.pin_rst = FT6236_PIN_RST,

.ops = {
.write_reg = ft6236_write_reg,
.read_reg = ft6236_read_reg,
.init = ft6236_hw_init,
.is_pressed = ft6236_is_pressed,
.read_x = ft6236_read_x,
.read_y = ft6236_read_y,
}
};

```
13 changes: 13 additions & 0 deletions hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@
"doks-docs-nav",
"doks-language-current",
"doks-languages",
"embedded_graphics-rust",
"esp32-s3",
"fpc-zh096g1321",
"freertos",
Expand All @@ -332,6 +333,7 @@
"nav-tabContent",
"no-os",
"no-os-fatfs-sd-spi-rpi-pico",
"nuttx",
"offcanvasNavMain",
"offcanvasNavMainLabel",
"offcanvasNavSection",
Expand Down Expand Up @@ -365,6 +367,8 @@
"searchToggleDesktop",
"searchToggleMobile",
"sinq13001bl-a1",
"slint",
"slint-rust",
"socialMenu",
"tabs-install-sdk-requirements-0",
"tabs-install-sdk-requirements-0-tab",
Expand All @@ -376,6 +380,7 @@
"uf2-烧录",
"vscode相关",
"yd-rp2040-核心板",
"zephyr",
"为什么我的-pico-无法启动",
"产品参数",
"其他版本",
Expand All @@ -384,11 +389,15 @@
"合理超频",
"器材准备",
"基于pico-sdk的",
"基于我们开发的版本",
"基于社区开源项目",
"如果上述版本都无法下载尝试访问如下链接直接下载压缩包",
"如果您觉得太麻烦了可以使用我们编译好的文件但这会覆盖您设备当前的内核及设备树操作步骤如下",
"官方版本国产版1",
"官方版本国产版2",
"性能优化",
"我们开发的",
"我们开发的版本",
"我在使用git拉取github工程时出现如下错误",
"我在编译工程时出现如下错误",
"指定电压下的最大时钟速度",
Expand All @@ -414,11 +423,15 @@
"硬件改动-飞线",
"硬件改动-飞线-1",
"示例工程",
"社区开源项目",
"社区或开源项目",
"社区或开源项目版本",
"移植流程",
"第一版移植",
"第三方开源",
"编译工程",
"网站一直没有更新",
"裸机",
"裸机版本",
"触摸屏",
"触摸驱动",
Expand Down

0 comments on commit 7f89956

Please sign in to comment.