<?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>How to call a C function instead of macro in RTX51 tiny</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/35501/how-to-call-a-c-function-instead-of-macro-in-rtx51-tiny</link><description> 
Hello, 

 
I&amp;#39;m trying to have a C function called when the tick timer 0 is
interrupted. 
in the manual it has this macro where i&amp;#39;m supposed to write the macro
but the problem is my code is in C and I don&amp;#39;t know how i&amp;#39;m supposed
to implement a function</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How to call a C function instead of macro in RTX51 tiny</title><link>https://community.arm.com/thread/94270?ContentTypeID=1</link><pubDate>Thu, 14 Dec 2017 13:09:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e7a041fc-3dda-45a9-9325-81bff31cfe72</guid><dc:creator>Daniel H</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you for the response,&lt;/p&gt;

&lt;p&gt;
You are right the subject is kind of misleading.&lt;/p&gt;

&lt;p&gt;
Since i posted the subject i&amp;#39;ve been trying to rethink the method
i&amp;#39;m going to write the code and now there&amp;#39;s another problem.&lt;/p&gt;

&lt;p&gt;
The code that i&amp;#39;m trying to write has already been writen by
someone else years ago using a round robin psuedo multitasking sort
of a way, the guy had a timer setup and defined timeslots for tasks
and set the run flag in it and in the main loop he just checked for
the flag and execeted the task function. He kept the data as static
variables so on each function call he still had the data.&lt;/p&gt;

&lt;p&gt;
The main problem with this method is that implementing delays
inside those tasks is very hard and requires a lot of switch
statements, the code is hard to maintain and understand.&lt;/p&gt;

&lt;p&gt;
To put it in a nutshell what i need is the os_wait function and
the attach task to interrupt function in RTX 51 but i found out the
rtx51 full is discontinued so i don&amp;#39;t have access to the attach task
to interrupt function.&lt;/p&gt;

&lt;p&gt;
Is there any way i can get it back from previous releases? Uvision
still has the option to select it as OS but the libraries are
missing.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to call a C function instead of macro in RTX51 tiny</title><link>https://community.arm.com/thread/85614?ContentTypeID=1</link><pubDate>Thu, 14 Dec 2017 12:35:34 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4a9d8414-66f4-446f-ae16-270e1f3ef09c</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
Your subject line is misleading almost to the point of being a
flat-out lie.&lt;/p&gt;

&lt;p&gt;
Your problem is not that you&amp;#39;re to write &amp;quot;a macro&amp;quot;; it is that
it&amp;#39;s to be an &lt;b&gt;assembly language&lt;/b&gt; macro. And no, you really
should &lt;b&gt;not&lt;/b&gt; be trying to call a C function from inside that
macro. If calling C functions had been considered safe to do from
that place, the callback would surely have been made a C
function.&lt;/p&gt;

&lt;p&gt;
Either way: whatever it is you actually want to do here should
almost certainly be done in an entirely different way. So take a few
steps back, to what your actual goal was, and re-start thinking about
methods from there.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>