mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-05 01:35:41 +00:00
Only report used channels up to PIN_IOR_NofChan() for this role (#1725)
This commit is contained in:
@ -1727,10 +1727,11 @@ bool CHANNEL_IsInUse(int ch) {
|
||||
|
||||
for (i = 0; i < PLATFORM_GPIO_MAX; i++) {
|
||||
if (g_cfg.pins.roles[i] != IOR_None) {
|
||||
if (g_cfg.pins.channels[i] == ch) {
|
||||
int NofC=PIN_IOR_NofChan(g_cfg.pins.roles[i]);
|
||||
if (NofC>=1 && g_cfg.pins.channels[i] == ch) {
|
||||
return true;
|
||||
}
|
||||
if (g_cfg.pins.channels2[i] == ch) {
|
||||
if (NofC>=2 && g_cfg.pins.channels2[i] == ch) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user