Skip to content
New issue

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

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

Already on GitHub? # to your account

platform: add radxa rock 5b+ support #16

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

nascs
Copy link

@nascs nascs commented Jul 12, 2024

周一测

nascs added 4 commits July 12, 2024 09:05
Signed-off-by: Nascs <nascs@radxa.com>
Signed-off-by: Nascs <nascs@radxa.com>
Signed-off-by: Nascs <nascs@radxa.com>
@nascs
Copy link
Author

nascs commented Jul 18, 2024

5B+ 的 PIN_29 和 PIN_31 与 5B 有区别,详见 radxa-docs/docs#338

nascs and others added 3 commits July 18, 2024 09:28
Signed-off-by: Nascs <nascs@radxa.com>
Signed-off-by: Nascs <nascs@radxa.com>
@nascs
Copy link
Author

nascs commented Jul 19, 2024

功能测试 ok

if(b->platform_name == PLATFORM_NAME_RADXA_ROCK_5B) {
mraa_radxa_rock_5b_pininfo(b, 29, 1, 31, (mraa_pincapabilities_t){1,1,1,0,0,0,0,0}, "GPIO1_D7");
mraa_radxa_rock_5b_pininfo(b, 31, 1, 15, (mraa_pincapabilities_t){1,1,1,0,0,0,0,0}, "GPIO1_B7");
mraa_radxa_rock_5b_pininfo(b, 37, -1, -1, (mraa_pincapabilities_t){1,0,0,0,0,0,1,0}, "NC");
Copy link
Author

Choose a reason for hiding this comment

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

5B PIN_37 这里 NC 是因为硬件要么没接出来要么是没贴电阻。

Copy link
Owner

Choose a reason for hiding this comment

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

上面的pinout和我们文档有更新么?我还是第一次知道这个

mraa_radxa_rock_5b_pininfo(b, 31, 1, 15, (mraa_pincapabilities_t){1,1,1,0,0,0,0,0}, "GPIO1_B7");
mraa_radxa_rock_5b_pininfo(b, 37, -1, -1, (mraa_pincapabilities_t){1,0,0,0,0,0,1,0}, "NC");
} else if(b->platform_name == PLATFORM_NAME_RADXA_ROCK_5B_PLUS) {
mraa_radxa_rock_5b_pininfo(b, 29, 1, 3, (mraa_pincapabilities_t){1,1,1,0,0,1,0,0}, "GPIO1_A3");
Copy link
Author

Choose a reason for hiding this comment

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

PIN_29 PWM1-M2, 板级打开了 PWM1-M0 这里关闭 PWM?

Copy link
Owner

Choose a reason for hiding this comment

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

是风扇共用的pwm控制器么?所以现在是开还是关

@nascs
Copy link
Author

nascs commented Jul 25, 2024

这个 pr 没找到 request for review 按钮,有空 review 一下?

Comment on lines 54 to +55
* [Radxa ROCK 5B](../master/docs/radxa_rock_5b.md)
* [Radxa ROCK 5B+](../master/docs/radxa_rock_5b.md)
Copy link
Owner

Choose a reason for hiding this comment

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

同一个文件你就这里改链接标题吧

- [Github](https://github.com/radxa)
Copy link
Owner

Choose a reason for hiding this comment

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

这改了啥?

@@ -152,7 +173,7 @@ mraa_radxa_rock_5b()
mraa_radxa_rock_5b_pininfo(b, 12, 3, 13, (mraa_pincapabilities_t){1,1,1,0,0,0,0,1}, "GPIO3_B5");
mraa_radxa_rock_5b_pininfo(b, 13, 3, 15, (mraa_pincapabilities_t){1,1,0,0,1,1,0,0}, "GPIO3_B7");
mraa_radxa_rock_5b_pininfo(b, 14, -1, -1, (mraa_pincapabilities_t){1,0,0,0,0,0,0,0}, "GND");
mraa_radxa_rock_5b_pininfo(b, 15, 3, 16, (mraa_pincapabilities_t){1,0,0,0,1,1,0,1}, "GPIO3_C0");
mraa_radxa_rock_5b_pininfo(b, 15, 3, 16, (mraa_pincapabilities_t){1,1,0,0,1,1,0,1}, "GPIO3_C0");
Copy link
Owner

Choose a reason for hiding this comment

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

为啥改

if(b->platform_name == PLATFORM_NAME_RADXA_ROCK_5B) {
mraa_radxa_rock_5b_pininfo(b, 29, 1, 31, (mraa_pincapabilities_t){1,1,1,0,0,0,0,0}, "GPIO1_D7");
mraa_radxa_rock_5b_pininfo(b, 31, 1, 15, (mraa_pincapabilities_t){1,1,1,0,0,0,0,0}, "GPIO1_B7");
mraa_radxa_rock_5b_pininfo(b, 37, -1, -1, (mraa_pincapabilities_t){1,0,0,0,0,0,1,0}, "NC");
Copy link
Owner

Choose a reason for hiding this comment

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

上面的pinout和我们文档有更新么?我还是第一次知道这个

mraa_radxa_rock_5b_pininfo(b, 31, 1, 15, (mraa_pincapabilities_t){1,1,1,0,0,0,0,0}, "GPIO1_B7");
mraa_radxa_rock_5b_pininfo(b, 37, -1, -1, (mraa_pincapabilities_t){1,0,0,0,0,0,1,0}, "NC");
} else if(b->platform_name == PLATFORM_NAME_RADXA_ROCK_5B_PLUS) {
mraa_radxa_rock_5b_pininfo(b, 29, 1, 3, (mraa_pincapabilities_t){1,1,1,0,0,1,0,0}, "GPIO1_A3");
Copy link
Owner

Choose a reason for hiding this comment

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

是风扇共用的pwm控制器么?所以现在是开还是关

@@ -1052,7 +1052,7 @@ mraa_file_contains(const char* filename, const char* content)
return 0;
}
while ((getline(&line, &len, fh) != -1) && (found == 0)) {
if (strstr(line, content)) {
if (strncmp(line, content, strlen(line)) == 0) {
Copy link
Owner

Choose a reason for hiding this comment

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

这两个函数干的事情完全不一样啊,怎么能改的?

Co-authored-by: ZHANG Yuntian <yt@radxa.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants