|
Re: Accessing GPIO pins: msg#00097windows.ce.devel
Hello Rob, With you hints I got VirtualAlloc and VirtualCopy funtions help. I have written a sample code and Included here. #define GPIO 0x40E00068 // physical addess of device #define size 4800*4 //page size int set; set = VirtualCopy(lps, GPIO, size, PAGE_READWRITE); // lps is handle written by VirtualAlloc function if I understand the functions correctly, I should write values to a virable "set" to toggle GPIO pins, like set = 0x64000000; // toggles GPIO pins ?? please carify, thanks Tom Convent. Rob Wehrli <rwehrli@xxxxxxxxxxx> wrote: On Thu, 17 Nov 2005 17:05:23 -0000, conventag <conventag@xxxxxxxxx> wrote: > hello friends, > > Iam new to CE 5.0 and Iam using intelPXA270 processor. I want to write > bytes to processor GPIO control register. it is possible to write > directly, for example I defined > #define GAFR2 (*((volatile unsigned long *) 0x40E00068)) > GAFR2 = 0x64000000; > > unfortunately I cannot see my GPIO pins acts accordingly. It is > possible to write directly or there are some functions in Windows CE > 5.0 to control processor registers. I appreciate if someone just pass > hints on how to access processor register under CE 5.0 > > thanks > > Do a search of VirtualAlloc and VirtualCopy in your MSDN for WinCE. Basically, you need to obtain a handle to physical memory mapped to the virtual address space before you can use it. Once you have a handle, you'll have fun toggling your GPIO pins by the dozens... Take Care. Rob! Mailing list addresses: Post message: windowsce-dev@xxxxxxxxxxxxxxx Unsubscribe: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx List owner: windowsce-dev-owner@xxxxxxxxxxxxxxx Website: http://groups.yahoo.com/group/windowsce-dev SPONSORED LINKS Windows ce Win32 programming Window ce development Basic programming language Computer programming languages Microsoft window ce --------------------------------- YAHOO! GROUPS LINKS Visit your group "windowsce-dev" on the web. To unsubscribe from this group, send an email to: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --------------------------------- --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Accessing GPIO pins: 00097, Rob Wehrli |
|---|---|
| Next by Date: | Re: Accessing GPIO pins: 00097, Rob Wehrli |
| Previous by Thread: | Re: Accessing GPIO pinsi: 00097, Rob Wehrli |
| Next by Thread: | Re: Accessing GPIO pins: 00097, Rob Wehrli |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |