<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>c programming</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/23502/c-programming</link><description> 
Hi 

 
I&amp;#39;m not too familiar with configuring pins for an LPC2129 and need
to use one for an upcoming project. I&amp;#39;ve seen numerous ways of
configuring the ports/pins etc. what is the easiest way to write
these in C? is it possible to write
PINSEL0|=(1</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: c programming</title><link>https://community.arm.com/thread/51636?ContentTypeID=1</link><pubDate>Mon, 24 Mar 2008 13:21:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2e9cabc3-aebb-432b-a8b4-0262386199e9</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Your code misses a bit or.&lt;/p&gt;

&lt;p&gt;
Anyway, if you configure registers that has 2 bits/pin, it might
be an idea to write:&lt;/p&gt;

&lt;pre&gt;
PINSEL0 |= 3 &amp;lt;&amp;lt; 28;
&lt;/pre&gt;

&lt;p&gt;
Then you can also write an enum that declares the values 0..3 that
you can assign.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>