declairing volatile struct in include file

#1172880
Rate this post
useful
not useful
The error means just what it says, you cab have a volatile variable or
function but not a volatile data type.

struct  sDeviceReg
{
...
};

volatile struct sDeviceReg device_instance ;


or

volatile struct  sDeviceReg
{
...
} device_instance ;


Note that in both cases it is device_instance that is volatile not
sDeviceReg. If you create other instances of this structure, they will
only be volatile if you declare them so individually.

Clifford

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now