This is what I decided to go with. Anyone see a problem:
struct DM64x_DevType
{
struct DM64x_REGS *pDM64x_REGS;
};
struct DM64x_REGS
Type: Posts; User: sheldoninst
This is what I decided to go with. Anyone see a problem:
struct DM64x_DevType
{
struct DM64x_REGS *pDM64x_REGS;
};
struct DM64x_REGS
I thought of a way but I would need to initialize values in a structure. Is this possible?
E.G.:
struct Regs
{
int c[2] = {3, 4};
That and the driver is in C and the app in C++. I'm not sure if that would cause problems for a shared file. Could I have both share a C file?
The devices are almost equivalent but addresses differ. The device type is not known at compile time. I don't need to do it in a header file but the driver and application both use the header file....
The only solution that comes to mind is a function that initializes the structure based on the device type but I would prefer doing this in a header file.
I already have a device structure with everything generic already in there. The problem is every time I read or write a register I need to check the device type and run a different line of code for...
I'm trying to remove device specific defines from my files. I would like to put all device specific names in a single header file. Currently I check a device type value and based on this value I...