Accessing GPIO ports from a user `C' program

  • HI,


    I know how to access and configure GPIO ports from the kernel, but now need
    to control an output pin from a `user' program.


    I have done this before on the pxa-255-arm, and know it involves
    accessing the physical memory space using /dev/mem
    to hit the registers and register config directly.


    WHAT I would really like is an API that does this all for me !
    All I want to do is control one logical output pin, but
    it is too slow to do this through the filesystem (I am controlling
    the data direction on RS-485, with a modbus timeout constraint).


    Is there an API on pico mod for control of I/O pins directly from `C'.


    Robin

  • Please see gpio.tar.bz2 in the /examples section and
    the PicoMOD6-GPIO-ReferenceCard.pdf in the /doc section of the PicoMOD6 Linux Download Area.


    Or just read here: <!-- l --><a class="postlink-local" href="http://www.forum.fs-net.de/viewtopic.php?f=32&t=2673">viewtopic.php?f=32&t=2673</a><!-- l -->

    F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • What I really want is to be able to see how many characters are in the UART buffer.


    I am using the serial comms with an additional RS485 TX ENABLE.


    I call a device driver to call a delay, and then request the data to be sent.


    The delay in the serial data being sent is very variable.


    Usually around 4mS but up to 20ms is not unusual.


    I find this a bit strange, because really all it has to do is bung
    the data in a FIFO on the arm chip (if its similar to the
    gumstix pxa based arm chip ~ which we do have the data sheet for).



    What I would rather do is make a simple char driver for my RS485 output port.
    But for that I need the S3 data sheet