dwhvw 0 Newbie Poster

Hi,

How can I convert the TeMyEnumeration constants to integer values? See code below

typedef enum{
  zero,
  one
}TeMyEnumeration;

typedef struct{
  TeMyEnumeration myEnumeration;
  int myInteger;
}

I send this complete structure, byte by byte, using a memory pointer to some serial output.
I want the myEnumeration variables also to be send as an Integer (4 bytes) but they are send as a single byte (char).

Thanks
Henk

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.