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
adb4c15b
Commit
adb4c15b
authored
10 years ago
by
Thomas Eichinger
Browse files
Options
Downloads
Patches
Plain Diff
drivers/at86rf231: handle channel out of range more conveniently
parent
5b65f222
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/at86rf231/at86rf231.c
+5
-2
5 additions, 2 deletions
drivers/at86rf231/at86rf231.c
drivers/include/at86rf231.h
+9
-1
9 additions, 1 deletion
drivers/include/at86rf231.h
with
14 additions
and
3 deletions
drivers/at86rf231/at86rf231.c
+
5
−
2
View file @
adb4c15b
...
...
@@ -173,14 +173,17 @@ uint16_t at86rf231_get_pan(void)
return
radio_pan
;
}
u
int8_t
at86rf231_set_channel
(
uint8_t
channel
)
int8_t
at86rf231_set_channel
(
uint8_t
channel
)
{
uint8_t
cca_state
;
radio_channel
=
channel
;
if
(
channel
<
RF86RF231_MIN_CHANNEL
||
channel
>
RF86RF231_MAX_CHANNEL
)
{
radio_channel
=
RF86RF231_MAX_CHANNEL
;
#if DEVELHELP
puts
(
"[at86rf231] channel out of range!"
);
#endif
return
-
1
;
}
cca_state
=
at86rf231_reg_read
(
AT86RF231_REG__PHY_CC_CCA
)
&
~
AT86RF231_PHY_CC_CCA_MASK__CHANNEL
;
...
...
This diff is collapsed.
Click to expand it.
drivers/include/at86rf231.h
+
9
−
1
View file @
adb4c15b
/*
* Copyright (C) 2014 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
#ifndef AT86RF231_H_
#define AT86RF231_H_
...
...
@@ -52,7 +60,7 @@ void at86rf231_rx_irq(void);
int16_t
at86rf231_send
(
at86rf231_packet_t
*
packet
);
u
int8_t
at86rf231_set_channel
(
uint8_t
channel
);
int8_t
at86rf231_set_channel
(
uint8_t
channel
);
uint8_t
at86rf231_get_channel
(
void
);
uint16_t
at86rf231_set_pan
(
uint16_t
pan
);
...
...
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