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
6c9578c0
Commit
6c9578c0
authored
11 years ago
by
Martine Lenders
Browse files
Options
Downloads
Patches
Plain Diff
Add sixlowpan to auto_init
parent
00acab92
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sys/auto_init/auto_init.c
+34
-2
34 additions, 2 deletions
sys/auto_init/auto_init.c
sys/net/network_layer/sixlowpan/border/border.c
+0
-4
0 additions, 4 deletions
sys/net/network_layer/sixlowpan/border/border.c
sys/net/routing/rpl/rpl.c
+0
-4
0 additions, 4 deletions
sys/net/routing/rpl/rpl.c
with
34 additions
and
10 deletions
sys/auto_init/auto_init.c
+
34
−
2
View file @
6c9578c0
...
@@ -51,6 +51,10 @@
...
@@ -51,6 +51,10 @@
#include
"rtc.h"
#include
"rtc.h"
#endif
#endif
#ifdef MODULE_SIXLOWPAN
#include
"sixlowpan.h"
#endif
#ifdef MODULE_DESTINY
#ifdef MODULE_DESTINY
#include
"destiny.h"
#include
"destiny.h"
#endif
#endif
...
@@ -63,6 +67,14 @@
...
@@ -63,6 +67,14 @@
#define ENABLE_DEBUG (0)
#define ENABLE_DEBUG (0)
#include
"debug.h"
#include
"debug.h"
#ifndef CONF_RADIO_ADDR
#define CONF_RADIO_ADDR (1)
#endif
#ifndef CONF_PAN_ID
#define CONF_PAN_ID (0xabcd)
#endif
extern
int
main
(
void
);
extern
int
main
(
void
);
void
auto_init
(
void
)
void
auto_init
(
void
)
...
@@ -103,6 +115,7 @@ void auto_init(void)
...
@@ -103,6 +115,7 @@ void auto_init(void)
MCI_initialize
();
MCI_initialize
();
#endif
#endif
#ifdef MODULE_NET_IF
#ifdef MODULE_NET_IF
int
iface
;
DEBUG
(
"Auto init net_if module.
\n
"
);
DEBUG
(
"Auto init net_if module.
\n
"
);
transceiver_type_t
transceivers
=
0
;
transceiver_type_t
transceivers
=
0
;
#ifdef MODULE_AT86RF231
#ifdef MODULE_AT86RF231
...
@@ -128,13 +141,32 @@ void auto_init(void)
...
@@ -128,13 +141,32 @@ void auto_init(void)
if
(
transceivers
!=
0
)
{
if
(
transceivers
!=
0
)
{
transceiver_init
(
transceivers
);
transceiver_init
(
transceivers
);
transceiver_start
();
transceiver_start
();
int
iface
=
net_if_init_interface
(
0
,
transceivers
);
iface
=
net_if_init_interface
(
0
,
transceivers
);
if
(
!
net_if_get_hardware_address
(
iface
))
{
DEBUG
(
"Auto init radio address on interface %d to 0x%04x
\n
"
,
iface
,
CONF_RADIO_ADDR
);
DEBUG
(
"Change this value at compile time with macro CONF_RADIO_ADDR
\n
"
);
net_if_set_hardware_address
(
iface
,
CONF_RADIO_ADDR
);
}
if
(
net_if_get_pan_id
(
iface
)
<=
0
)
{
DEBUG
(
"Auto init PAN ID on interface %d to 0x%04x
\n
"
,
iface
,
CONF_PAN_ID
);
DEBUG
(
"Change this value at compile time with macro CONF_PAN_ID
\n
"
);
net_if_set_pan_id
(
iface
,
CONF_PAN_ID
);
}
if
(
iface
>=
0
)
{
if
(
iface
>=
0
)
{
DEBUG
(
"
Interface %d initialize
d
\n
"
,
iface
);
DEBUG
(
"
Auto init interface %
d
\n
"
,
iface
);
}
}
}
}
else
{
iface
=
-
1
;
}
#ifdef MODULE_SIXLOWPAN
DEBUG
(
"Auto init 6LoWPAN module.
\n
"
);
sixlowpan_lowpan_init
();
#endif
#endif
#endif
#ifdef MODULE_PROFILING
#ifdef MODULE_PROFILING
extern
void
profiling_init
(
void
);
extern
void
profiling_init
(
void
);
...
...
This diff is collapsed.
Click to expand it.
sys/net/network_layer/sixlowpan/border/border.c
+
0
−
4
View file @
6c9578c0
...
@@ -142,10 +142,6 @@ int sixlowpan_lowpan_border_init(int if_id)
...
@@ -142,10 +142,6 @@ int sixlowpan_lowpan_border_init(int if_id)
return
0
;
return
0
;
}
}
if
(
!
sixlowpan_lowpan_init
())
{
return
0
;
}
if
(
!
sixlowpan_lowpan_init_interface
(
if_id
))
{
if
(
!
sixlowpan_lowpan_init_interface
(
if_id
))
{
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sys/net/routing/rpl/rpl.c
+
0
−
4
View file @
6c9578c0
...
@@ -209,10 +209,6 @@ uint8_t rpl_init(int if_id)
...
@@ -209,10 +209,6 @@ uint8_t rpl_init(int if_id)
objective_functions
[
0
]
=
rpl_get_of0
();
objective_functions
[
0
]
=
rpl_get_of0
();
/* objective_functions[1] = rpl_get_of_ETX() */
/* objective_functions[1] = rpl_get_of_ETX() */
if
(
!
sixlowpan_lowpan_init
())
{
return
0
;
}
sixlowpan_lowpan_init_interface
(
if_id
);
sixlowpan_lowpan_init_interface
(
if_id
);
/* need link local prefix to query _our_ corresponding address */
/* need link local prefix to query _our_ corresponding address */
ipv6_addr_t
ll_address
;
ipv6_addr_t
ll_address
;
...
...
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