-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Nascs <nascs@radxa.com>
Signed-off-by: Nascs <nascs@radxa.com>
Signed-off-by: Nascs <nascs@radxa.com>
Signed-off-by: Nascs <nascs@radxa.com>
5B+ 的 PIN_29 和 PIN_31 与 5B 有区别,详见 radxa-docs/docs#338 |
Signed-off-by: Nascs <nascs@radxa.com>
Signed-off-by: Nascs <nascs@radxa.com>
Signed-off-by: Nascs <nascs@radxa.com>
功能测试 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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5B PIN_37 这里 NC 是因为硬件要么没接出来要么是没贴电阻。
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是风扇共用的pwm控制器么?所以现在是开还是关
这个 pr 没找到 request for review 按钮,有空 review 一下? |
* [Radxa ROCK 5B](../master/docs/radxa_rock_5b.md) | ||
* [Radxa ROCK 5B+](../master/docs/radxa_rock_5b.md) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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>
周一测