<?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>problem with FUNC</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/16627/problem-with-func</link><description> I always get an error 129 (missing &amp;#39;;&amp;#39; before &amp;#39;void&amp;#39;) when I compile in this part: 
func void iicstart (void) 
{ 
	sda = 1; 
	scl = 1; 
	del4us () 
	sda = 0; 
	del4us () 
	scl = 0; 
	del4us () 
} 
 
what is wrong? </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: problem with FUNC</title><link>https://community.arm.com/thread/42094?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2004 08:02:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e15846a9-123e-4f8a-9bc3-1df81d3be156</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;On second look, it appears you have debugger functions confused with C functions.&lt;br /&gt;
&lt;br /&gt;
When writing your C program, you must use ANSI C rules.  And, &lt;b&gt;func&lt;/b&gt; is not a part of that rule set.&lt;br /&gt;
&lt;br /&gt;
If your function is intended to be used in your program, you should modify it as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;void iicstart (void)
{
sda = 1;
scl = 1;
del4us ();
sda = 0;
del4us ();
scl = 0;
del4us ();
}&lt;/pre&gt;
&lt;br /&gt;
If, on the other hand, the function is intended to be used in the debugger (to simulate the input of an I2C input signal) you should modify it as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;func void iicstart (void) {
sda = 1;
scl = 1;
del4us ();
sda = 0;
del4us ();
scl = 0;
del4us ();
}&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with FUNC</title><link>https://community.arm.com/thread/96266?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2004 20:05:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c8de2c96-f387-404a-a882-7caac8764522</guid><dc:creator>Drew Davis</dc:creator><description>&lt;p&gt;Maybe del4us() is a macro that inserts its own semicolons?&lt;br /&gt;
&lt;br /&gt;
#define del4us()  _nop_;_nop_;_nop_;_nop_;&lt;br /&gt;
&lt;br /&gt;
(Not a style I would recommend.  I write macros that look like functions assuming I&amp;#39;ll put a semicolon after them at the point of use.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with FUNC</title><link>https://community.arm.com/thread/86751?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2004 17:41:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f5401fd1-2e33-4ff5-b391-5ebafb4629b0</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;Should there be a ; after del4us ()???&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Surely, there should be a &amp;#39;;&amp;#39; after &lt;i&gt;&lt;b&gt;each&lt;/b&gt;&lt;/i&gt; del4us() ?!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with FUNC</title><link>https://community.arm.com/thread/96271?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2004 17:40:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:60db0afd-4507-4365-95df-b7df16663aa5</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;&amp;#39;Missing ; before &amp;lt;token&amp;gt;&amp;#39; is one of those compiler error messages that you wish actually says what it means.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
What it means is that the compiler expects &lt;i&gt;&lt;b&gt;nothing&lt;/b&gt;&lt;/i&gt; before &amp;lt;token&amp;gt;; therefore, if it finds &lt;i&gt;something&lt;/i&gt; before &amp;lt;token&amp;gt;, it assumes that there should&amp;#39;ve been a &amp;#39;;&amp;#39; after the &lt;i&gt;&amp;quot;something&amp;quot;&lt;/i&gt; !!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with FUNC</title><link>https://community.arm.com/thread/86752?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2004 17:18:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:78e47ce8-f487-445a-b177-5a2ae77bfc66</guid><dc:creator>Drew Davis</dc:creator><description>&lt;p&gt;&amp;quot;func&amp;quot; is the problem.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Missing ; before &amp;lt;token&amp;gt;&amp;quot; is one of those compiler error messages that you wish actually says what it means.  Normally, I see this error when there is an undefined type for a return value of a function.&lt;br /&gt;
&lt;br /&gt;
ForgotToInclude f()&lt;br /&gt;
&lt;br /&gt;
- Missing ; before f.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with FUNC</title><link>https://community.arm.com/thread/42092?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2004 17:16:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:951ae889-fe6d-452c-979d-456a96d1c627</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;Should there be a ; after del4us ()???&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with FUNC</title><link>https://community.arm.com/thread/42095?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2004 16:28:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:79d1f744-c28c-4340-b976-d48f43f3dece</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;Is this supposed to be &amp;#39;C&amp;#39;?&lt;br /&gt;
&lt;br /&gt;
If so, what is &lt;b&gt;func&lt;/b&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>