<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: developing IO Drivers for MQX in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149487#M356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;cheers that seems to have fixed that problem - however a new problem has appeared. in my rng_task file after setting up the IO commands (open, close, read, write and ioctl) and the install command it hits the following line and complains about an undefined indentifier 'rng_range_struct' : (highlighted in red where the error occurs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
_mqx_int _io_rng_open(FILE_PTR fd_ptr, char_ptr open_name_ptr, char_ptr flags)
{
 VMCF5225_STRUCT_PTR reg_ptr = (VMCF5225_STRUCT_PTR)BSP_IPSBAR;
 &lt;SPAN&gt;&lt;FONT color="#ff0000"&gt;rng_range_struct.rng_max_value = 0xFFFFFFFF;&lt;/FONT&gt;
&lt;/SPAN&gt; rng_range_struct.rng_min_value = 0;

 reg_ptr-&amp;gt;RNG.RNGCR |= MCF5225_RNG_RNGCR_GO;

 return(IO_OK);
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;i have added the lines to the ioctl.h to define the IO type :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
#define IO_TYPE_PCCARD             0x09
#define IO_TYPE_PCFLASH            0x0A
#define IO_TYPE_PIPE               0x0B
#define IO_TYPE_QSPI               0x0C
#define IO_TYPE_SERIAL             0x0D
#define IO_TYPE_SPI                0x0E
#define IO_TYPE_USBMFS             0x0F
#define IO_TYPE_TFS                0x10
&lt;FONT color="#ff0000"&gt;&lt;SPAN&gt;#define IO_TYPE_RNG     0x11&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;however it hasnt turned the pale blue that the other define device types have so i have a feeling that this is what is causing the undefined indentifier error. So have i missed adding something in the ioctl.h file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by private_hell on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-28&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:57 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by private_hell on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-28&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:58 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 08:51:45 GMT</pubDate>
    <dc:creator>private_hell</dc:creator>
    <dc:date>2020-10-29T08:51:45Z</dc:date>
    <item>
      <title>developing IO Drivers for MQX</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149485#M354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im following thru Application note AN3902 or creating IO drivers for MQX. Im trying to create the random number generator as per part 4 of the note, however when i go to make the program i get the follow error: illegal argument list - io_rng.h line 14 #define MINIMUM_AMOUNT_OF_BYTES(4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now im puzzled why this is coming up as it is copied directly from the application note. the code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
#ifndef __RNG_DRIVER__
#define __RNG_DRIVER__

#include "ioctl.h"

typedef struct rng_struct
{
    uint_32 rng_max_value;
    uint_32 rng_min_value;
} RNG_STRUCT, _PTR_ RNG_DRIVER_STRUCT_PTR;

typedef volatile struct rng_struct _PTR_VRNG_STRUCT_PTR;

&lt;FONT color="#999999"&gt;&lt;FONT color="#ff0000"&gt;#define MINIMUM_AMOUNT_OF_BYTES(4)&lt;/FONT&gt;
&lt;/FONT&gt;

#define IO_IOCTL_RNG_SET_MAX_VALUE        _IO(IO_TYPE_RNG,0x01)
#define IO_IOCTL_RNG_SET_MIN_VALUE        _IO(IO_TYPE_RNG,0x02)
#define IO_IOCTL_RNG_SET_NUMBER_SIZE    _IO(IO_TYPE_RNG,0x03)

#ifdef __cplusplus
extern "c"
{
    #endif
  
    extern _mqx_int _io_rng_install (char_ptr identifier);
    #ifdef __cplusplus
}
#endif

#endif&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;with the line causing he problem highlighted in red. Does anyone know what could be causing this? im currently using MQX 3.2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;jase&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by private_hell on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-27&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:47 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:51:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149485#M354</guid>
      <dc:creator>private_hell</dc:creator>
      <dc:date>2020-10-29T08:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: developing IO Drivers for MQX</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149486#M355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that error is cause by the lack of a space between the MINIMUM_AMOUNT_OF_BYTES&amp;nbsp; and the&amp;nbsp; (4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try to put it as follows and see what happens&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#999999"&gt;&lt;FONT color="#ff0000"&gt;#define MINIMUM_AMOUNT_OF_BYTES (4)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:51:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149486#M355</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2020-10-29T08:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: developing IO Drivers for MQX</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149487#M356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;cheers that seems to have fixed that problem - however a new problem has appeared. in my rng_task file after setting up the IO commands (open, close, read, write and ioctl) and the install command it hits the following line and complains about an undefined indentifier 'rng_range_struct' : (highlighted in red where the error occurs)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
_mqx_int _io_rng_open(FILE_PTR fd_ptr, char_ptr open_name_ptr, char_ptr flags)
{
 VMCF5225_STRUCT_PTR reg_ptr = (VMCF5225_STRUCT_PTR)BSP_IPSBAR;
 &lt;SPAN&gt;&lt;FONT color="#ff0000"&gt;rng_range_struct.rng_max_value = 0xFFFFFFFF;&lt;/FONT&gt;
&lt;/SPAN&gt; rng_range_struct.rng_min_value = 0;

 reg_ptr-&amp;gt;RNG.RNGCR |= MCF5225_RNG_RNGCR_GO;

 return(IO_OK);
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;i have added the lines to the ioctl.h to define the IO type :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
#define IO_TYPE_PCCARD             0x09
#define IO_TYPE_PCFLASH            0x0A
#define IO_TYPE_PIPE               0x0B
#define IO_TYPE_QSPI               0x0C
#define IO_TYPE_SERIAL             0x0D
#define IO_TYPE_SPI                0x0E
#define IO_TYPE_USBMFS             0x0F
#define IO_TYPE_TFS                0x10
&lt;FONT color="#ff0000"&gt;&lt;SPAN&gt;#define IO_TYPE_RNG     0x11&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;however it hasnt turned the pale blue that the other define device types have so i have a feeling that this is what is causing the undefined indentifier error. So have i missed adding something in the ioctl.h file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by private_hell on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-28&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:57 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by private_hell on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-28&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:58 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:51:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149487#M356</guid>
      <dc:creator>private_hell</dc:creator>
      <dc:date>2020-10-29T08:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: developing IO Drivers for MQX</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149488#M357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;undefined indentifier 'rng_range_struct' means, that compiler does not know what 'rng_range_struct' is&lt;/P&gt;&lt;P&gt;please concentrate to fix that problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2009 15:02:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/developing-IO-Drivers-for-MQX/m-p/149488#M357</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-10-29T15:02:20Z</dc:date>
    </item>
  </channel>
</rss>

