ANDROID GPIO user buttons in Beaglebone for

951 views
Skip to first unread message

chainz

unread,
Aug 22, 2012, 3:08:58 AM8/22/12
to 0xlab...@googlegroups.com
Hi everyone

      I'm working with ANDROID ICS  in beglebone, i'm developing my android device. I want to use 4 user buttons thee are
  1. Menu
  2. Back
  3. Home
  4. Power ON/OFF
In my beaglebone header the following gpio are available GPIO0_26 GPIO1_1, GPIO1_2, GPIO1_3, GPIO1_4, GPIO2_1, GPIO2_8 and etc.,

    In these GPIO i wanna use any 4 GPIO for my user buttons. For work properly where i have to change my code.

At where i can activate these gpio for my usage, how the key code can be assign for android, because i'm new to android.

Can any one help me.?

Thanks in advance.

Yu-Ping Dai

unread,
Aug 22, 2012, 12:54:33 PM8/22/12
to 0xlab...@googlegroups.com
Sorry, I can not sure.
Maybe this can help you something

Regard

2012/8/22 chainz <sangilikuma...@marudham.co.in>

--
You received this message because you are subscribed to the Google Groups "0xlab-devel" group.
To view this discussion on the web visit https://groups.google.com/d/msg/0xlab-devel/-/dydoEofyCMcJ.
To post to this group, send email to 0xlab...@googlegroups.com.
To unsubscribe from this group, send email to 0xlab-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/0xlab-devel?hl=en.

chainz

unread,
Aug 23, 2012, 5:05:43 AM8/23/12
to 0xlab...@googlegroups.com
Thanks Mr.cam11505
        
                 But the links are not helpful for my topic.

This link is the answer for Beagleboard https://groups.google.com/forum/?fromgroups=#!topic/0xlab-devel/14hrKgjpBKE  this explain  how to modify the source file in AOSP but i'm using TI ANDROID ICS AOSP, the files mentioned in above link is not present in my AOSP.

I need clear idea about gpio configuration.

david....@cirrusresearch.co.uk

unread,
Aug 24, 2012, 10:38:38 AM8/24/12
to 0xlab...@googlegroups.com
Hi,
I am also trying to the same thing and set certain GPIO pins to be certain keys on the Android Build.
If anyone has a definitive guide on how to do this it would be much appreciated.
Cheers
David

chainz

unread,
Sep 3, 2012, 7:17:48 AM9/3/12
to 0xlab...@googlegroups.com
Hi david
            Did you completed this task.? can you tell me a details, i hope i can help yo. I've completed this after long struggle.

david....@cirrusresearch.co.uk

unread,
Sep 3, 2012, 7:46:18 AM9/3/12
to 0xlab...@googlegroups.com
Hi Chainz,
Thanks for the reply.

No as it happens I am still struggling to work out how to do this. If you could help in any way it would be very much appreciated.

Thanks
David

david....@cirrusresearch.co.uk

unread,
Sep 3, 2012, 8:06:26 AM9/3/12
to 0xlab...@googlegroups.com
Hi Chainz,

I have not completed this task. I am still stuck, I would like to be able to define any of the GPIO pins on the beaglebone to be a specified button in the Android system. For example GPIO pin 16 is the Home button.

Any help would be much appreciated

David

chainz

unread,
Sep 4, 2012, 1:32:06 AM9/4/12
to 0xlab...@googlegroups.com
Hey david

Its not a big issue i'll explain you that how to do that. I am assuming that you are you using TI-Android source code.
In that GPIO1_16,17,31 is already implemented in lcd_cape_keys in board-am335xevm.c so its reduce our work. but this pins are active only if you are plugging your beaglebone LCD cape. but i guess you don't have LCD cape. 

I'm assuming you are using BB div cape for display. Do the following steps to make your GPIO work

1--> Configure the GPIO_Buttons in kernel ( its configured default in TI source code)
2--> Copy the lcd_cape_keys_init(DEV_ON_DGHTER_BRD,PROFILE_NONE)          ( line no--2449)
3--> Paste the line below the dvi_init(DEV_ON_DGHTER_BRD,PROFILE_NONE)      ( line no-- 2455)

Then as usual build the source code and boot BB in your android shell screen execute the " getevent" yo will see the 

add device 2: /dev/input/event2
   name: "gpio-keys"

If you can see this you have added the gpio driver node successfully . Then touch the p9-4 pin and gpio1_16 you will get some scanning code in your shell screen. if you can see this code your work is over, its will work for home,back,power off as configured in board.c file.

Note: If you are not using DIV cape paste the init function at where you want call the init function 

After try this let me know that you got it or not, because i wanna know my idea is working or not.

Good luck david.

Cheers
Chainz  
 

 
Reply all
Reply to author
Forward
0 new messages