Skip to contentSkip to conversation

Q: use of enum in struct dtv_frontend_properties

DISCUSSION Antti Palosaari 1 participant 1 message Jul 10, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

I am adding DTMB support (again) for DVB API. There is new parameter interleaving needed. Currently it has 3 values. I defined it as a enum as typedef enum is not allowed anymore in Kernel.

Should I define it as (enum fe_interleaving) or (u8) in struct dtv_frontend_properties?

enum fe_interleaving {
	INTERLEAVING_NONE,
	INTERLEAVING_240,
	INTERLEAVING_720,
};
struct dtv_frontend_properties {
	enum fe_interleaving    interleaving;
};

*** OR ***:

struct dtv_frontend_properties {
	u8    interleaving;
};

regards
Antti

Signature · 1 line
http://palosaari.fi/