This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
disk activity to gpio
#1
Is it possible to send disk activity led flash to the GPIO with the Tinker?

Thanks.
Reply
#2
It is. But it may take a bit of skill to program the TB to detect and use these signals.
For example you might use a photodiode or phototransistor to detect the LED flashing and write a program with WiringPi to solve your problem.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#3
Not sure,
maybe can modify your custom device tree, and select one gpio as led pin.
then set disk led setting on that gpio.
Reply
#4
I still not understand where the lights should come from.
If the TB should signalize disk activities, for SD is already there. For reading from a portable disk, then the disk should provide its own lights.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#5
No, as I knew.
The disk activity LED is from some software service or driver to monitor, and then trigger and control the LED's light by High-Low LED's GPIO.

ref here:
https://github.com/TinkerBoard/debian_ke...#L163-L180

Code:
    gpio-leds {
        compatible = "gpio-leds";

        pwr-led {
            gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "default-on";
        };

        act-led {
            gpios=<&gpio1 24 GPIO_ACTIVE_HIGH>;
            linux,default-trigger="mmc0";
        };

        led1-led {
            gpios=<&gpio1 25 GPIO_ACTIVE_HIGH>;
            linux,default-trigger="default-off";
        };
    };
We can find act-led was set for monitor mmcblk0's disk activity on device tree.
(the mmc0 is SD card, mmc1 is eMMC)

So I guess we can add a new led's setting, maybe like below? to let it high low signal directly to GPIO40.
Code:
    gpio-leds {
        compatible = "gpio-leds";

        pwr-led {
            gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "default-on";
        };

        act-led {
            gpios=<&gpio1 24 GPIO_ACTIVE_HIGH>;
            linux,default-trigger="mmc0";
        };

        led1-led {
            gpios=<&gpio1 25 GPIO_ACTIVE_HIGH>;
            linux,default-trigger="default-off";
        };

        disk-gpio {
            gpios=<&gpioX XX GPIO_ACTIVE_HIGH>;
            linux,default-trigger="mmc0";
        };
    };
But I have no idea how to modify the GPIO address &gpioX XX.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)