Skip to content

platform: add radxa rock 5b+ support#16

Open
nascs wants to merge 8 commits intoRadxaYuntian:masterfrom
nascs:Add_Radxa_ROCK5B+_Support
Open

platform: add radxa rock 5b+ support#16
nascs wants to merge 8 commits intoRadxaYuntian:masterfrom
nascs:Add_Radxa_ROCK5B+_Support

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.

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

- [Product Info](https://docs.radxa.com/en/rock5/rock5b)
- [Forums](https://forum.radxa.com/c/rock5)
- [Github](https://github.com/radxa) No newline at end of file
- [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.

这改了啥?

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控制器么?所以现在是开还是关

}
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>
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