-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ieee802154: centralize default values #5977
ieee802154: centralize default values #5977
Conversation
f686ab1
to
6d8d6fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the arguable naming issues, I tested for CC2538
: works!
@@ -45,7 +45,7 @@ extern "C" { | |||
/** | |||
* @brief Maximum possible packet size in byte | |||
*/ | |||
#define AT86RF2XX_MAX_PKT_LENGTH (127) | |||
#define AT86RF2XX_MAX_PKT_LENGTH (IEEE802154_MAX_FRAME_LEN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mhm, the naming seems somewhat inconsistent here it is IEEE802154_MAX_FRAME_LEN
instead of IEEE802154_FRAME_LEN_MAX
compare to above IEEE802154_CHANNEL_MAX
. Or what's the rational?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is true. Will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed.
#endif | ||
#define AT86RF2XX_MIN_CHANNEL (IEEE802154_CHANNEL_MIN) | ||
#define AT86RF2XX_MAX_CHANNEL (IEEE802154_CHANNEL_MAX) | ||
#define AT86RF2XX_DEFAULT_CHANNEL (IEEE802154_DEFAULT_CHANNEL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here why its not IEEE802154_CHANNEL_DEFAULT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look at how they are grouped in net/ieee802154.h
and this naming makes more sense ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see these macros as legacy wrapper so if the definitions of those look a little bit weird I'm not that sad as a clean definition of the new macros ;-)
|
||
/** | ||
* @brief Default TX power (0dBm) | ||
*/ | ||
#define AT86RF2XX_DEFAULT_TXPOWER (0U) | ||
#define AT86RF2XX_DEFAULT_TXPOWER (IEEE802154_DEFAULT_TXPOWER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dito here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Ack'n'Go after Murdock - and squash of last commit.
88d0016
to
4e789ed
Compare
Squashed |
The config assumed it was a 2.4 GHz radio. This solution isn't perfect either but eliminates a few more cases.
4e789ed
to
964cd75
Compare
Rebased to current master. |
Fixes #3291.
I also changed up the selection of the default channel a little bit, since it was limited to 2.4 GHz IEEE 802.15.4 only. This solution isn't perfect either, but better than the previous one I think.