Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help on gpio_request_ex function

Featured Replies

I'm developing a watchdog driver and I need get 3 gpios, from FEX file.

 

I'm trying this:

 

[wdt_para]
wdt_used     = 1
wdt_wdi_gpio = port:PH26<1><default><default><0>
wdt_ign_gpio = port:PC20<0><default><default><0>
wdt_off_gpio = port:PC19<1><default><default><0>

 

if(SCRIPT_PARSER_OK != script_parser_fetch("wdt_para", "wdt_used", &wdt_used, 1))
    {
        pr_err("%s: script_parser_fetch err. \n", __func__);
        return -1;
    }
    if(1 != wdt_used){
        pr_err("%s: wdt_unused. \n",  __func__);
        return -1;
    }

    gpio_wdi = gpio_request_ex("wdt_para", "wdt_wdi_gpio");
    if(!gpio_wdi) {
        pr_err("%s: gpio_wdi request fail value = %d!\n", __func__,gpio_wdi);
        return -1;
    }

    gpio_ign = gpio_request_ex("wdt_para", "wdt_ign_gpio");
    if(!gpio_ign) {
        pr_err("%s: gpio_ign request fail value = %d!\n", __func__,gpio_ign);
        return -1;
    }

    gpio_off = gpio_request_ex("wdt_para", "wdt_off_gpio");
    if(!gpio_off) {
        pr_err("%s: gpio_off request fail value = %d!\n", __func__,gpio_off);
        return -1;
    }

 

 

 

But gpio_request_ex returns 0 in all three gpios. If I change the first one to wdt_gpio in this way above, the gpio_request_ex works. I think that function wait the name wdt and gpio, but doesn't accept anything in the middle, but I need start three GPIOs. How can I do that?

 

[wdt_para]
wdt_used     = 1
wdt_gpio = port:PH26<1><default><default><0>

 

 gpio_wdi = gpio_request_ex("wdt_para", "wdt_gpio");
    if(!gpio_wdi) {
        pr_err("%s: gpio_wdi request fail value = %d!\n", __func__,gpio_wdi);
        return -1;
    }

 

 

 

 

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.