GPIO on MPC8308ERD board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO on MPC8308ERD board

789 Views
ismaelfaye
Contributor I

Hi all,

I am using MPC8308erdb board and right now I want to have futher information about the GPIO in the CPU. What I want to do, is to access (write and read) the GPIO registers, to enable interruption... But I am confused when I look at the source code of the BSP and I guess you will help me.

My question is How is the GPIO handled by the drivers in the kernel? where is the GPIO driver defined? in which file? I ask these questions because I am a bit confuse. I see in the source code that we have ../drivers/gpio/gpiolib.c and we also have ../arch/powerpc/sysdev/mpc8xxx.c... And the question is which one must be used to handle the GPIO on MPC8308erdb board.

And can you explain me how to manage the GPIO? What I have to do, to change in the source code? Which driver do I have to use?

Thank you in advance.

Best regards,

Ismael FAYE

0 Kudos
1 Reply

528 Views
lunminliang
NXP Employee
NXP Employee

Just post comment for more users to refer.

There is no special driver for accessing to GPIO in this BSP. Use mmap command. It is a POSIX-compliant Linux/Unix system call that maps files or devices into memory. It is a method of memory-mapped file I/O. For example, look at the following links (http://en.wikipedia.org/wiki/Mmap) and (http://beej.us/guide/bgipc/output/html/multipage/mmap.html).

0 Kudos