aslanbaris
Joined: 19 Sep 2006 Posts: 2
|
help for const and volatile... |
Posted: Tue Sep 19, 2006 12:46 am |
|
|
Hi,
i'm trying to port the c code that written for "cosmic c" and "hi-tech c" compiler.
CCS compiler (3.224) give error message: "Unknown type" for "const" and "volatile". How can i port it for CCS?
Regards,
Baris
----------------------------------------------------------------------
#if !defined(DEFINED_LonDev_H)
#define DEFINED_LonDev_H
#include <stddef.h>
#include "platform.h"
#include "NvTypes.h"
typedef enum
{
NVIDX_nviRequest = 0,
NVIDX_nvoStatus = 1,
NVIDX_nviVolt = 2,
NVIDX_nvoVolt = 3,
NVIDX_count = 4
} NVIndex;
typedef enum
{
MTIDX_count = 0
} MTIndex;
#define MIP_APP_OUTPUT_BUFSIZE 50
#define MIP_APP_INPUT_BUFSIZE 50
#define MIP_EXPLICIT_ADDRESSING 0
#define STD_PROGRAM_ID "9F:FF:FF:00:00:02:04:01"
typedef struct
{
const volatile void * const pData; /* pointer to network variable's data */
size_t Size; /* size of network variable in bytes */
BitField IsOutput : 1; /* input otherwise */
BitField IsPersist : 1; /* the NV data is supposed to be persistent */
BitField IsPolled : 1; /* NV doesn't send unsolicited updates or is a polling NVI */
BitField IsSync : 1; /* repeated assignments in critical section cause repeated propagation */
} TNvTable;
typedef Bool TMtTable;
extern int getMaxNvIndex(void);
extern const Byte* getLonSiData(Word *pLen);
extern const Byte* getAppinitMsg(void);
extern const TNvTable * const getNvTable(void);
extern const TMtTable * const getMtTable(void);
extern volatile SNVT_obj_request nviRequest;
extern volatile SNVT_obj_status nvoStatus;
extern volatile SNVT_vol nviVolt;
extern volatile SNVT_vol nvoVolt;
#endif /* defined(DEFINED_LonDev_H) */ _________________ Baris |
|