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.

Poll both PCA9535 I/O using one interrupt? 

Featured Replies

Hi everybody,

In a project I'm working on, I've added two PCA9535 I/O expanders to use 32 additional inputs on my Nano Pi Neo. 
I've connected the INT line from both multiplexers to the gpio11 interrupt pin on the Nano Pi Neo, and attached to that a pull-up resistor of 10k. 
I've used interrupts before, but my question is how to poll both PCA9535 I/O using one interrupt? 
my DTS when polling one (It works!):

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5";

    fragment@0 {
        /* This fragment is required only if using interrupts */
        target = <&pio>;
        __overlay__ {
            pca9535_pin_irq: pca9535_pin_irq {
                pins = "PA11";
                function = "irq";
                bias-pull-up;
            };
        };
    };

    fragment@1 {
        target = <&i2c1>;
        __overlay__ {
            #address-cells = <1>;
            #size-cells = <0>;
            pca9535@20 {
                compatible = "nxp,pca9535";
                reg = <0x20>;
                status = "okay";
                gpio-controller;
                #gpio-cells = <2>;
                gpio-line-names = "DI1", "DI2", "DI3", "DI4", "DI5", "DI6", "DI7", "DI8", "DI9", "DI10", "DI11", "DI12", "DI13", "DI14", "DI15", "DI16";
                /* Below are optional properties for supporting interrupts */
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupt-parent = <&pio>;
                interrupts = <0 11 2>; /* PA11 IRQ_TYPE_EDGE_FALLING */
                pinctrl-names = "default";
                pinctrl-0 = <&pca9535_pin_irq>;
            };
        };
    };

};


Any chance somebody could help me out? Any help is greatly appreciated!

Thanks a lot, Denis

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.