Skip to content

Commit

Permalink
update: 调整LuatOS固件对Air780EQ的GPIO支持范围,以符合产品定义
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Sep 20, 2024
1 parent e23718b commit a34b286
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions interface/src/luat_gpio_ec7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ int luat_gpio_open(luat_gpio_cfg_t* gpio)
return 0;
}

#if defined(__LUATOS__) && defined(TYPE_EC716E)
else if (gpio->pin < 10) {
// Air780EQ不支持普通GPIO,所以屏蔽
extern int soc_get_model_name(char *model, uint8_t is_full);
char model[16] = {0};
soc_get_model_name(model, 0);
if (strcmp(model, "Air780EQ") == 0)
{
return -1;
}
}
#endif

uint8_t is_pull;
uint8_t is_pullup;
uint8_t is_input = (LUAT_GPIO_OUTPUT == gpio->mode)?0:1;
Expand Down

0 comments on commit a34b286

Please sign in to comment.