CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

help for const and volatile...

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
aslanbaris



Joined: 19 Sep 2006
Posts: 2

View user's profile Send private message

help for const and volatile...
PostPosted: Tue Sep 19, 2006 12:46 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group