AnsweredAssumed Answered

developing IO Drivers for MQX

Question asked by jason edwards on Oct 27, 2009
Latest reply on Oct 29, 2009 by Juraj Vanco

Hi

 

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)

 

now im puzzled why this is coming up as it is copied directly from the application note. the code is:

 


#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;

#define MINIMUM_AMOUNT_OF_BYTES(4)


#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

 

 

 

 with the line causing he problem highlighted in red. Does anyone know what could be causing this? im currently using MQX 3.2.

 

cheers

jase

Message Edited by private_hell on 2009-10-27 12:47 AM

Outcomes