EAPI_Test and GPIO

Discussion in 'UDOO BOLT' started by LLandre, Jun 18, 2020.

Tags:
  1. LLandre

    LLandre UDOOer

    Joined:
    Jun 18, 2020
    Messages:
    2
    Likes Received:
    1
    I need to configure pin 27 of CN25 (KSO10) as an ouput GPIO by using EAPI_Test program.
    IIUC, I need to run something like this:
    sudo ./EAPI_Test -gs 0 <param_2> <param_3> 0

    It is not clear, however, what values I have to use for <param_2> and <param_3>:
    <param_2> -> ID (see 9.1.1 in COM_EAPI_R1_0.pdf
    <param_3> -> Bitmask (see 9.1 in COM_EAPI_R1_0.pdf

    Any help would be appreciated.
    Thank you.
     
  2. Maximo

    Maximo UDOOer

    Joined:
    Aug 11, 2017
    Messages:
    14
    Likes Received:
    4
    I did some tests and found the following correlation between PIN # / FUNCTION / EAPI ID:

    upload_2020-6-24_15-55-30.png


    PIN >>> EAPI ID
    13 >>> 0
    14 >>> 5
    15 >>> 1
    16 >>> 6
    17 >>> 2
    18 >>> 7
    19 >>> 3
    20 >>> 8
    21 >>> 4
    22 >>> 9
    23 >>> 10
    24 >>> 13
    25 >>> 11
    26 >>> 14
    27 >>> 12
    28 >>> 15


    so, in your case, to set the PIN 27 to output it should be:
    Code:
    EAPI_Test -gs 0 12 1 0
    (I always use 1 for the bitmask)

    and then you change the value with:
    Code:
    EAPI_Test -gf 0 12 1 0
    EAPI_Test -gf 0 12 1 1
     

    Attached Files:

    ccs_hello likes this.
  3. LLandre

    LLandre UDOOer

    Joined:
    Jun 18, 2020
    Messages:
    2
    Likes Received:
    1
    Thank you, Maximo.
    It works perfectly. :)

     
    Maximo likes this.
  4. Maximo

    Maximo UDOOer

    Joined:
    Aug 11, 2017
    Messages:
    14
    Likes Received:
    4
    LLandre and waltervl like this.

Share This Page