Im trying to:
volatile struct sDeviceReg
{
.
.
.
};
and I'm getting the error:
error: qualifiers can only be specified for objects and functions
Am I doing this wrong??
Thanks
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