<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pandorawiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TheAllSeeingEye</id>
	<title>Pandora Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://pandorawiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TheAllSeeingEye"/>
	<link rel="alternate" type="text/html" href="https://pandorawiki.org/Special:Contributions/TheAllSeeingEye"/>
	<updated>2026-04-23T13:27:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.0-alpha</generator>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Kernel_interface&amp;diff=1393</id>
		<title>Kernel interface</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Kernel_interface&amp;diff=1393"/>
		<updated>2009-07-04T18:25:40Z</updated>

		<summary type="html">&lt;p&gt;TheAllSeeingEye: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Warning''': this is preliminary and is subject to change until release.&lt;br /&gt;
&lt;br /&gt;
In case you need to write low level code (you can't/don't want to use high level libs like SDL), you can use kernel interface. This is the recommended way to access hardware (as opposed to GP2X style of accessing chip registers by mmap'ing /dev/mem), because in case hardware changes are needed in future, they could be handled by kernel and all programs would still work. It also should allow several programs to work at the same time and should be more stable.&lt;br /&gt;
&lt;br /&gt;
==Input==&lt;br /&gt;
Buttons, keypad, touchscreen and nubs are all exposed through Linux event interface (EVDEV). All devices are represented by /dev/input/eventX files, which can be opened, read and queried (using ioctl calls). The reads can be synchronous (the read will only return when user does something, like presses the button), or asynchronous (the system will report what changed since the last time you asked).&lt;br /&gt;
&lt;br /&gt;
'''Warning''': don't hardcode device filenames in your program! For example, currently /dev/input/event2 represents game buttons, but in future it may become touchscreen. Scan input device names instead, example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
for (i = 0; 1; i++)&lt;br /&gt;
{&lt;br /&gt;
  sprintf(name, &amp;quot;/dev/input/event%i&amp;quot;, i);&lt;br /&gt;
  fd = open(name, O_RDONLY);&lt;br /&gt;
  if (fd &amp;lt; 0) break; /* no more devices */&lt;br /&gt;
  ioctl(fd, EVIOCGNAME(sizeof(name)), name);&lt;br /&gt;
  if (strcmp(name, &amp;quot;gpio-keys&amp;quot;) == 0)&lt;br /&gt;
    return fd; /* found the buttons! */&lt;br /&gt;
  close(fd); /* we don't need this device */&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of device names and events they send:&lt;br /&gt;
{|border=1 cellpadding=2 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
!name&lt;br /&gt;
!description&lt;br /&gt;
!event.type&lt;br /&gt;
!event.code&lt;br /&gt;
!event.value&lt;br /&gt;
|-&lt;br /&gt;
|omap_twl4030keypad&lt;br /&gt;
|keypad&lt;br /&gt;
|EV_KEY&lt;br /&gt;
|KEY_0...KEY_Z, KEY_BACKSPACE, KEY_LEFTSHIFT, KEY_SPACE, KEY_ENTER, KEY_COMMA, KEY_DOT, KEY_FN&lt;br /&gt;
|0 - released, 1 - pressed, 2 - autorepeat event&lt;br /&gt;
|-&lt;br /&gt;
|gpio-keys&lt;br /&gt;
|game buttons&lt;br /&gt;
|EV_KEY&lt;br /&gt;
|KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_MENU, BTN_START, BTN_SELECT, BTN_X, BTN_Y, BTN_A, BTN_B, BTN_TL, BTN_TR&lt;br /&gt;
|0 - released, 1 - pressed&lt;br /&gt;
|-&lt;br /&gt;
|ADS784x Touchscreen&lt;br /&gt;
|touchscreen&lt;br /&gt;
|EV_ABS&lt;br /&gt;
|ABS_X, ABS_Y, ABS_PRESSURE&lt;br /&gt;
|varies, use calibration data&lt;br /&gt;
|-&lt;br /&gt;
|vsense66&lt;br /&gt;
|left nub&lt;br /&gt;
|EV_ABS&lt;br /&gt;
|ABS_X, ABS_Y&lt;br /&gt;
| -256...0...256&lt;br /&gt;
|-&lt;br /&gt;
|vsense67&lt;br /&gt;
|right nub&lt;br /&gt;
|EV_ABS&lt;br /&gt;
|ABS_X, ABS_Y&lt;br /&gt;
| -256...0...256&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sample code:&lt;br /&gt;
[http://beagleboard.googlecode.com/files/evtest.c evtest.c]&lt;br /&gt;
[http://notaz.gp2x.de/misc/pnd/src/pnd_test_inputs.c pnd_test_inputs.c]&lt;br /&gt;
&lt;br /&gt;
===Touchscreen===&lt;br /&gt;
Event interface returns uncalibrated values directly from driver, so you need to use tslib or manage calibration yourself (using data from /etc/pointercal).&lt;br /&gt;
&lt;br /&gt;
==Sound==&lt;br /&gt;
Pandora uses ALSA, but it has OSS emulation enabled too, so GP2X code should work.&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
Framebuffer device (/dev/fb0) is supported. More to come..&lt;br /&gt;
&lt;br /&gt;
==LEDs and backlight==&lt;br /&gt;
The LEDs can be controlled via /sys/class/leds/, and then a file [http://www.gp32x.com/board/index.php?s=&amp;amp;showtopic=45309&amp;amp;view=findpost&amp;amp;p=673593]:&lt;br /&gt;
* pandora::sd1&lt;br /&gt;
* pandora::sd2&lt;br /&gt;
* pandora::charger&lt;br /&gt;
* pandora::power&lt;br /&gt;
* pandora::bluetooth&lt;br /&gt;
* pandora::wifi&lt;br /&gt;
* pandora::keypad_bl&lt;br /&gt;
Backlight can be controlled via /sys/class/backlight/.&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
Some things can be controlled through files in /proc/pandora/:&lt;br /&gt;
* /proc/pandora/cpu_mhz_max - if [http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html cpufreq] is enabled, sets maximum allowed cpu clock, if not, just sets CPU clock to value supplied (echo 600 &amp;gt; /proc/pandora/cpu_mhz_max). Might also just use cpufreq parameters themselves.&lt;br /&gt;
* /proc/pandora/wait_vsync - if you read this file, your process will block until next vsync interrupt (note: this might change to fbdev ioctl).&lt;br /&gt;
more to come..&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>TheAllSeeingEye</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Hardware_documentation&amp;diff=1392</id>
		<title>Hardware documentation</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Hardware_documentation&amp;diff=1392"/>
		<updated>2009-07-04T18:22:59Z</updated>

		<summary type="html">&lt;p&gt;TheAllSeeingEye: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==OMAP3530==&lt;br /&gt;
*OMAP35x: Main page on TI site[http://focus.ti.com/general/docs/gencontent.tsp?contentId=36915]&lt;br /&gt;
*OMAP3530 specific page[http://focus.ti.com/docs/prod/folders/print/omap3530.html]  ''This lists the features of the chip and has all the applicable Technical Documents''&lt;br /&gt;
*OMAP35XX technical manual: [http://www.ti.com/litv/pdf/spruf98b] (38MB PDF)&lt;br /&gt;
&lt;br /&gt;
==C64x+==&lt;br /&gt;
*CPU and Instruction Set Reference Guide[http://focus.ti.com/lit/ug/spru732h/spru732h.pdf]&lt;br /&gt;
*TMS320C6000 Assembly Language Tools v 6.0 Beta User's Guide[http://focus.ti.com/dsp/docs/dspsupporttechdocsc.tsp?sectionId=3&amp;amp;tabId=409&amp;amp;abstractName=spru186p]&lt;br /&gt;
*TMS320C6000 Optimizing Compiler v 6.0 Beta User's Guide[http://focus.ti.com/dsp/docs/dspsupporttechdocsc.tsp?sectionId=3&amp;amp;tabId=409&amp;amp;familyId=44&amp;amp;abstractName=spru187n]&lt;br /&gt;
*TMS320C6000 Programmer's Guide[http://focus.ti.com/dsp/docs/dspsupporttechdocsc.tsp?sectionId=3&amp;amp;tabId=409&amp;amp;abstractName=spru198i]&lt;br /&gt;
&lt;br /&gt;
==Cortex-A8==&lt;br /&gt;
*r1p1[http://infocenter.arm.com/help/topic/com.arm.doc.ddi0344b/DDI0344.pdf]  ''Note: OMAP3530 uses r1p2''&lt;br /&gt;
*NEON instructions[http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204h/Bcfjicfj.html]&lt;br /&gt;
*'''UPDATE''': r2p2 Documentation [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344e/index.html]  ''Note: OMAP3530 uses r1p2''&lt;br /&gt;
*NEON memory hazards[http://hardwarebug.org/2008/12/31/arm-neon-memory-hazards/]&lt;br /&gt;
&lt;br /&gt;
==Screen==&lt;br /&gt;
*Screen datasheet (TD043MTEA2)[http://beyondinfinite.com/lcd/Library/Toppoly/TD043MTEA2.pdf]&lt;br /&gt;
&lt;br /&gt;
==OpenGL ES 2.0==&lt;br /&gt;
*Official site[http://khronos.org/opengles/2_X/]&lt;br /&gt;
&lt;br /&gt;
==Other OMAP3530 Projects==&lt;br /&gt;
*Beagle Board Resources[http://beagleboard.org/resources] As it uses the same SoC, many BB resources are also relevant for the Pandora.&lt;br /&gt;
*Beagle Board Google Group[http://groups.google.com/group/beagleboard]&lt;br /&gt;
&lt;br /&gt;
[[Category:Categories]]&lt;/div&gt;</summary>
		<author><name>TheAllSeeingEye</name></author>
		
	</entry>
</feed>