This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: am5728 button use

Part Number: AM5728

Tool/software: Linux

hello every one:

my board " www.ti.com/.../tmdsevm572x

my SDK is ti-processor-sdk-linux-arm57xx-evm-03.01.00.06 under the ubuntu14.04 . I want to use the button to but I do not know how to use them.

eg. I want to use one button to camera ,the other one to Audio. 

Can you help me? Thanks.

please give me some advise

  • Hi,

    Are you referring to the user inputs (user1, user2, ..., user5) buttons?

    Those are GPIO keys:

    USER1 {
    label = "Up";
    linux,code = <KEY_UP>;
    gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
    };

    USER2 {
    label = "Down";
    linux,code = <KEY_DOWN>;
    gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
    };

    USER3 {
    label = "Left";
    linux,code = <KEY_LEFT>;
    gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
    };

    USER4 {
    label = "Right";
    linux,code = <KEY_RIGHT>;
    gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
    };

    USER5 {
    label = "Home";
    linux,code = <KEY_HOME>;
    gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
    };

    They are not meant to be used for controlling camera or audio.

    Best Regards,
    Yordan
  • hello:
    Where is the introduction of the key? I can use the command evtest /dev/input/event0
    when I push the key ,those are the outputs:


    root@am57xx-evm:/dev/input# evtest /dev/input/event0
    Input driver version is 1.0.1
    Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
    Input device name: "gpio_keys"
    Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)
    Event code 102 (KEY_HOME)
    Event code 103 (KEY_UP)
    Event code 105 (KEY_LEFT)
    Event code 106 (KEY_RIGHT)
    Event code 108 (KEY_DOWN)
    Key repeat handling:
    Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
    Value 250
    Repeat code 1 (REP_PERIOD)
    Value 33
    Properties:
    Testing ... (interrupt to exit)

    Event: time 1482994423.201647, type 1 (EV_KEY), code 103 (KEY_UP), value 1
    Event: time 1482994423.201647, -------------- SYN_REPORT ------------
    Event: time 1482994423.375885, type 1 (EV_KEY), code 103 (KEY_UP), value 0
    Event: time 1482994423.375885, -------------- SYN_REPORT ------------

    Event: time 1482994439.747535, type 1 (EV_KEY), code 108 (KEY_DOWN), value 1
    Event: time 1482994439.747535, -------------- SYN_REPORT ------------
    Event: time 1482994439.944338, type 1 (EV_KEY), code 108 (KEY_DOWN), value 0
    Event: time 1482994439.944338, -------------- SYN_REPORT ------------

    Event: time 1482994455.631321, type 1 (EV_KEY), code 105 (KEY_LEFT), value 1
    Event: time 1482994455.631321, -------------- SYN_REPORT ------------
    Event: time 1482994455.801045, type 1 (EV_KEY), code 105 (KEY_LEFT), value 0
    Event: time 1482994455.801045, -------------- SYN_REPORT ------------

    Event: time 1482994471.551553, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 1
    Event: time 1482994471.551553, -------------- SYN_REPORT ------------
    Event: time 1482994471.719824, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 0
    Event: time 1482994471.719824, -------------- SYN_REPORT ------------

    Event: time 1482994488.064901, type 1 (EV_KEY), code 102 (KEY_HOME), value 1
    Event: time 1482994488.064901, -------------- SYN_REPORT ------------
    Event: time 1482994488.243961, type 1 (EV_KEY), code 102 (KEY_HOME), value 0
    Event: time 1482994488.243961, -------------- SYN_REPORT ------------


    What should I do if I want to use a key to generate an interrupt and start the camera in the interrupt?
  • Hello:

    Where can I get the user inputs buttons reference?
    Thanks.