Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions drivers/gpio/gpio_cmsdk_ahb.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ static int cmsdk_ahb_gpio_get_config(const struct device *dev, uint32_t mask, gp
*flags |= (cfg->port->pullup_enable_set & mask) ? GPIO_PULL_UP : 0;

*flags |= (cfg->port->inenable_set & mask) ? GPIO_INPUT : 0;
if (!(cfg->port->intenset & mask)) {
*flags |= GPIO_INT_DISABLE;
return 0;
}
*flags |= (cfg->port->inttypeset & mask) ? GPIO_INT_MODE_EDGE : GPIO_INT_MODE_LEVEL;
*flags |= (((struct gpio_cmsdk_ahb_dev_data *)dev->data)->intboth & mask)
? GPIO_INT_TRIG_BOTH
: ((cfg->port->intpolset & mask) ? GPIO_INT_TRIG_HIGH : GPIO_INT_TRIG_LOW);
#endif // CONFIG_SOC_FAMILY_ATM

return 0;
Expand Down