Skip to content

Conversation

@qzhang1535
Copy link
Contributor

@qzhang1535 qzhang1535 commented Apr 10, 2020

拉取/合并请求描述:(PR description)

[
目前mini2440的bsp包代码比较旧,无法使用rt-thread新的功能和特性(自动化初始机制、posix接口等)。故对bsp里部分代码做些修改以适配新的功能。具体修改如下:
1、加入Kconfig以支持图形化菜单配置
2、编译脚本中添加动态模块编译参数
3、开启自动初始化机制支持
4、重构串口驱动以解决开启posix支持后终端无响应问题
5、解决dm9000网卡驱动link up问题
6、添加mnt.c文件用来挂载文件系统
]

以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
The following content must not be changed in submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use web browser to visit PR, and check items one by one, and ticked them if no problem.

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other style
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 本拉取/合并请求代码是高质量的 Code in this PR is of high quality

1、加入Kconfig以支持图形化菜单配置
2、编译脚本中添加动态模块编译参数
3、开启自动初始化机制支持
4、重构串口驱动以解决开启posix支持后终端无响应问题
5、解决dm9000网卡驱动link up问题
6、添加mnt.c文件用来挂载文件系统

}

#ifdef RT_USING_MODULE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个并不需要吧

rt_kprintf("allocate partition sector buffer failed\n");

return;
return RT_ERROR;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

错误时,请返回负数

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

错误时,请返回负数

您好,感谢您的检视。请问我在源码中没有找到负数错误码的宏定义,是直接返回-1吗?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是需要返回 -RT_ERROR; 类似的负数的error。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已按照建议修改了返回值。请问下,pr当前状态为changes request。这种状态下我该如何处理,才能让pr的流程继续往下走。第一次发起pr,不太明白,谢谢。^ ^

int mnt_init(void)
{

if(dfs_mount(RT_NULL, "/", "ram", 0, dfs_ramfs_create(rt_malloc(1024),1024)) == 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里就直接创建出这么大的ramdisk了,貌似不太好吧,可以使用sdcard做为root吗?或者弄个romfs来做为根。


if GetDepend('RT_USING_RTGUI'):
src += ['touch.c', 'key.c', 'calibration.c']
src += ['touch.c', 'key.c']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RT_USING_RTGUI是否还有?现在只有GUI Engine的软件包了,是PKG_USING_RTGUI吧

src += ['touch.c', 'key.c', 'calibration.c']
src += ['touch.c', 'key.c']

if GetDepend('RT_USING_FTK'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTK也不存在了

Copy link
Member

@BernardXiong BernardXiong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢更新,请查看注释的内容,谢谢

Copy link
Member

@BernardXiong BernardXiong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢更新,请查看注释的内容,谢谢

2. Modify the return code to -1 when failed
3. Change the mounting filesystem from ramfs to sdcard
4. Replace RT_USING_RTGUI with PKG_USING_GUIENGINE and remove RT_USING_FTK
@qzhang1535 qzhang1535 requested a review from BernardXiong April 11, 2020 10:44
Copy link
Contributor Author

@qzhang1535 qzhang1535 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

针对文件系统挂载,返回错误码作出修改,删除无用的函数

@BernardXiong BernardXiong merged commit 5c399d5 into RT-Thread:master Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants