Search:

Type: Posts; User: sheldoninst

Search: Search took 0.00 seconds.

  1. Thread: structs

    by sheldoninst
    Replies
    11
    Views
    1,065

    This is what I decided to go with. Anyone see a...

    This is what I decided to go with. Anyone see a problem:



    struct DM64x_DevType
    {
    struct DM64x_REGS *pDM64x_REGS;
    };

    struct DM64x_REGS
  2. Thread: structs

    by sheldoninst
    Replies
    11
    Views
    1,065

    I thought of a way but I would need to initialize...

    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};
  3. Thread: structs

    by sheldoninst
    Replies
    11
    Views
    1,065

    That and the driver is in C and the app in C++. ...

    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?
  4. Thread: structs

    by sheldoninst
    Replies
    11
    Views
    1,065

    The devices are almost equivalent but addresses...

    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....
  5. Thread: structs

    by sheldoninst
    Replies
    11
    Views
    1,065

    The only solution that comes to mind is a...

    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.
  6. Thread: structs

    by sheldoninst
    Replies
    11
    Views
    1,065

    I already have a device structure with everything...

    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...
  7. Thread: structs

    by sheldoninst
    Replies
    11
    Views
    1,065

    structs

    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...
Results 1 to 7 of 7