[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [uracoli-devel] radio_set_state()
From: |
Axel Wachtler |
Subject: |
Re: [uracoli-devel] radio_set_state() |
Date: |
Mon, 12 Jul 2010 23:26:40 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Daniel,
> I could eliminate the effect by adding the attribute "SHORTENUM" to enum
> "radio_state_t" in radio.h. It seems that the compiler declares the enum as
> 16-bit and optimizes something in the switch-case. But what? What is
> happening? Do we have to look at other locations handling around with
> enums?
I'm in the moment not sure how to test, if the compiler does align
the enum packed or not. Normally a standard enum should be
handled correctly and the compiler should warn if there is no
default statement and not all values are handled.
What I mean to say, if SHORTENUM fixes the issue, then it is Ok
for now, but looking into future directions with 32 bit MCUs, the
SHORTENUM may generate unefficient code.
Another candidate would be radio_tx_done_t in radio.h and
various enums in wibocmd.h
Cheers, Axel
--
------------------------------------------------------------------
Axel Wachtler
Mail: address@hidden
Fingerprint: FA2C 4FB1 AC18 5FA3 F4F1 1114 3F38 E0DF 8C3A DC95
Public Key: http://www.keyserver.net
------------------------------------------------------------------
Das beste beim Diktieren ist, dass man Worte verwenden kann, von
denen man keine Ahnung hat, wie sie geschrieben werden!