enum identifiers in a switch case

the case of a switch expression having an enum type and the case expressions include the identifiers which are looked up as enum constants in the enum type does not build proper.produces and error c1815 & c1845.

I think you cannot used the 'MyEnum' identifier as the switch variable, because it is the enum type name. You need to create another variable and assign it the enum constant that you want to process with yout switch statement.

As an aside for maximum efficiency, remember that underlying data type for an enum is an int, for which the compiler might generate 16-bit signed code, which can be inefficient for 8-bit micros. If you have only a few elements you might be better off just making a bunch of #define's and assigning them to a uchar.