Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
fcb55c36
Unverified
Commit
fcb55c36
authored
6 years ago
by
Koen Zandberg
Browse files
Options
Downloads
Patches
Plain Diff
kw2xrf: Don't set netdev values in addr setters
parent
5fa40a02
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/kw2xrf/kw2xrf_getset.c
+1
-4
1 addition, 4 deletions
drivers/kw2xrf/kw2xrf_getset.c
with
1 addition
and
4 deletions
drivers/kw2xrf/kw2xrf_getset.c
+
1
−
4
View file @
fcb55c36
...
...
@@ -266,12 +266,10 @@ void kw2xrf_set_addr_short(kw2xrf_t *dev, uint16_t addr)
uint8_t
val_ar
[
2
];
val_ar
[
0
]
=
(
addr
>>
8
);
val_ar
[
1
]
=
(
uint8_t
)
addr
;
dev
->
netdev
.
short_addr
[
0
]
=
val_ar
[
1
];
dev
->
netdev
.
short_addr
[
1
]
=
val_ar
[
0
];
#ifdef MODULE_SIXLOWPAN
/* https://tools.ietf.org/html/rfc4944#section-12 requires the first bit to
* 0 for unicast addresses */
dev
->
netdev
.
short_add
r
[
1
]
&=
0x7F
;
val_a
r
[
0
]
&=
0x7F
;
#endif
kw2xrf_write_iregs
(
dev
,
MKW2XDMI_MACSHORTADDRS0_LSB
,
val_ar
,
IEEE802154_SHORT_ADDRESS_LEN
);
...
...
@@ -283,7 +281,6 @@ void kw2xrf_set_addr_long(kw2xrf_t *dev, uint64_t addr)
uint8_t
*
ap
=
(
uint8_t
*
)(
&
tmp
);
for
(
unsigned
i
=
0
;
i
<
IEEE802154_LONG_ADDRESS_LEN
;
i
++
)
{
dev
->
netdev
.
long_addr
[
i
]
=
(
uint8_t
)(
addr
>>
(
i
*
8
));
ap
[
i
]
=
(
addr
>>
((
IEEE802154_LONG_ADDRESS_LEN
-
1
-
i
)
*
8
));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment