All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Working example for direct memory mapped IO
@ 2006-12-13 21:48 Niklaus Giger
  2006-12-14 13:14 ` Jan Kiszka
  0 siblings, 1 reply; 7+ messages in thread
From: Niklaus Giger @ 2006-12-13 21:48 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

Hi

To document basic Xenomai/Linux patterns I developed the attached small 
example for our PPC405 board, which just rolls the 8 debug LEDs.

Are there any comments about it? 

Shall I put it into the Wiki at http://www.xenomai.org/index.php/Examples or 
does somebody want to commit it to the examples part of the subversion trunk?

Best regards

-- 
Niklaus Giger

[-- Attachment #2: hw_direct_io.c.zip --]
[-- Type: application/x-zip, Size: 1467 bytes --]

PK\x03\x04\x14\0\0\0\b\0\x0f¶5HQ\x16&4\x05\0\0µ
\0\0\x0e\0\0\0hw_direct_io.cVmoâ8\x10þ¼üŠQW]%¬\x17Bßv÷ú"! -º–¢@UÝí­"“8à6Ø‘m(Õíío¿±“Ph{/\x11"Ž=žyfæñŒ›õ\x1aÔa<ã\x1aôœf\x19°\x15ç\x19ÃÏ™|Ô€\x7f`$Ð8fZÜͥz‚„+\x16›ì©a÷ö\r<rÜ(Eö\x04R=à\b†ÃÎApx1T0¡š%\x10/´‘s¸¼ƒ‰¤*\x01™Â€iC3¸¦:žqÁ\x04´/Juhy‘%ÄÚfK¦\bL\x180ª9ê§	Í\rêCHšÏyF\x15êÜD¡c%ñEñ…x¿ÀU¯«ÁãÂ0µDk­æžµ­Y,Eâ\x13xœñx\x06T1˜Ó<g‰UeuË9ƒ	7VÖÌ\x18\\fû7ÕøÙµ\I^[\x15©\\x1cƸ-c,\aܶÐ\x18@+¼\ÝaD0˜\x0f\X\x05+&äœr·¡#ó'ŧ3\x03^ìÃ^\x10\x1cÁ€?dt¡á‚O™‚\x13Q|6¦î“\x1a^[ÿ	ST§\r©¦g¨¥Y«½ç"Î\x16	ƒ\x13m\x12.^[³³©4\x16&ÛžB©ŒO¶ç\x16‚ãô\v¹'ݜϩؚÝY®lŽu³|7f;µ\x1a†\x17””&23Åh\x12qÁç\x1f×–’'[\vl…\vv\x16\x17\x17Bó©À\fRL¡ž±$dSDÁT¹\x11ꘓ®£Z_Vk^<Ü×i’¨Ê\0\0"½bɈ\x19o­Ô‰aÆ\x17\fÅjï\x13–"Çàº=ŒFýß{p\x10|=º½Úš¿n~\x05o-ñ	Zþzý²s»\x1f!•¢°wÑ\x1f{!¼ù\x04«ÞùQ\x10|\x0e‚Úÿt¡ögÍntÂV6²Ç… 9–\™6J\x1c»u™¦‘\x01CÕ”\x198\x05ïÙO\f½\x0fN\x15|€Ÿ•\x1fÅ.›–4A÷ÝGêyi‚›e΄·ÓLز‰tÚ!p\x13…Ý»\x10~à`ôÛ ãûpz
ŸZ>\x14Øì“+Ô•>ï‚ØžP\x10ÒØ³i5²¤ñ‡Øñ×[\ª[åÄ_\x05†f\x13{ŽõAN§ÌÍUN#2$[îyE,üÂY²N\x19ax3Æ\x04´»\bՍïÂþ¸WJ\¶Ã^—ÔÞ½CI\x19©Ò8zþl\x04ƒW\x1aø\a\x17¯‹\x12‡; ¥\x1cY	©T.¶\0îæ€n\x12(ùWmVÌ,”Xû²åt•IØ0ý"kx\x1fÁƒí%k\b3[%Ö/¾\x16¡}:³ÿH\x164Á‘5½Àª·›¯A“5H²Fïž
Û[ÜÚ\x04@Ö\x0e•PJߟ	‹~»Š€uN¸Ò‹õu\x1a\x13(i¯¦Ëoß\vâÛ5Ã\v†Î3\x19?`\x03ò®;WQç6\f{ƒñ\x0f;>¿\x1d߆=ß	QãhõáeMqPP\x13ÆØPý0Êé#rÜJ¡Û­€\0þö÷ê­`w~;è\fÇ¡ÿªf¡,Ù#ûä€\x1c’#ò™|!_I+°¦-Ø\x14<kâ\f\x02¿È\x01–fæ\x15ÀÊ ´œ÷ÿRöÐíwUîvõ/\x0e-ì&.=Qdû7ƒ("n¥5-K=›ôJí\x7f\x15»² 4ëpŽ´•\x13\x1d/°¹aßE Z
-ÁŒ.™ms‚M©í¦Ø±¨H°ïòÔ\x14mËꂽ}Û\x03µ•´“\x19ÃUÛq¬Ízí*\x12l×s\x1f~\x16JNNP\x0f΃·ûD\x01yÛ™{Ç­ÍHíâáÓoÄ)Šºíq¯\x18û×8\x02ÿ\x18ÜÑà  ãÖ\b§\x19×Ôp¼™\x14ø7Ño?§^[\a°èLþ[5¼,âþ«ÎPœ
4-ØÊØ`Û³hÃ\x17Keuà[\x18¼£àñÀÔã	©î\x17Ѹ\x13¾F÷­õ}\v\°úœ¦,ÀçØ\x1a\x19c \x19Œ\f¦\x11ï\x13…b{'( \fðòV^ˆäBYµÚ%Ú1\x17(dܘ¬¸èL˜yd¬
-yÞý)Ú¸‡“Sø‚ï\x1f\x1dëË‚iÙÙe\x19}òŽì!D\0\x17HI¿yX•Ågž¶,	î‹ù¢(n&6Ávð*¯…°;7A1.OX`‰ô7PK\x01\x02\x14\x03\x14\0\0\0\b\0\x0f¶5HQ\x16&4\x05\0\0µ
\0\0\x0e\0	\0\0\0\0\0\0\0\0\0¤\0\0\0\0hw_direct_io.cUT\x05\0\a.u€EPK\x05\x06\0\0\0\0\x01\0\x01\0E\0\0\0`\x05\0\0\0\0

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: [Xenomai-help] Working example for direct memory mapped IO
@ 2006-12-14 14:14 Fillod Stephane
  0 siblings, 0 replies; 7+ messages in thread
From: Fillod Stephane @ 2006-12-14 14:14 UTC (permalink / raw)
  To: niklaus.giger, xenomai

Niklaus Giger wrote:
>To document basic Xenomai/Linux patterns I developed the attached small

>example for our PPC405 board, which just rolls the 8 debug LEDs.
>
>Are there any comments about it? 

This is a worthy example. I strongly recommend you to declare your 
ledRegister variable as volatile. You'll find another example in
the Denx's FAQ[1], and accessible through shorter URL[2].
Personally, I always access hardware registers through in_[lbe]{8,16,32}
out_[lbe]{8,16,32} macros, so the code is portable across machines of 
different endianess, and thanks to the integrated memory barriers, 
I known exactly when the CPU will actually perform the I/O with respect 
to the other C instructions.

[1]
http://www.denx.de/wiki/bin/view/PPCEmbedded/DeviceDrivers#Section_Acces
singPeripheralsFromUserSpace
[2] http://tinyurl.com/6c7th

Best regards
-- 
Stephane


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-12-19 20:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-13 21:48 [Xenomai-help] Working example for direct memory mapped IO Niklaus Giger
2006-12-14 13:14 ` Jan Kiszka
2006-12-15 20:25   ` Niklaus Giger
2006-12-17 20:26     ` Jan Kiszka
2006-12-19 20:04       ` Niklaus Giger
2006-12-19 20:35         ` Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2006-12-14 14:14 Fillod Stephane

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.