Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
64916436
Commit
64916436
authored
Feb 14, 2017
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
zephyr: Enable IPv6 networking in addition to IPv4.
parent
ee3615d8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
zephyr/main.c
+7
-2
7 additions, 2 deletions
zephyr/main.c
zephyr/prj_base.conf
+2
-1
2 additions, 1 deletion
zephyr/prj_base.conf
with
9 additions
and
3 deletions
zephyr/main.c
+
7
−
2
View file @
64916436
...
...
@@ -67,11 +67,16 @@ static char *stack_top;
static
char
heap
[
MICROPY_HEAP_SIZE
];
void
init_zephyr
(
void
)
{
// TODO: Make addresses configurable
#ifdef CONFIG_NET_IPV4
// TODO: Make address configurable
static
struct
in_addr
in4addr_my
=
{{{
192
,
0
,
2
,
1
}}};
net_if_ipv4_addr_add
(
net_if_get_default
(),
&
in4addr_my
,
NET_ADDR_MANUAL
,
0
);
#endif
#ifdef CONFIG_NET_IPV6
// 2001:db8::1
static
struct
in6_addr
in6addr_my
=
{{{
0x20
,
0x01
,
0x0d
,
0xb8
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
}}};
net_if_ipv6_addr_add
(
net_if_get_default
(),
&
in6addr_my
,
NET_ADDR_MANUAL
,
0
);
#endif
}
int
real_main
(
void
)
{
...
...
This diff is collapsed.
Click to expand it.
zephyr/prj_base.conf
+
2
−
1
View file @
64916436
...
...
@@ -8,5 +8,6 @@ CONFIG_MAIN_STACK_SIZE=4096
# Networking config
CONFIG_NETWORKING
=
y
CONFIG_NET_IPV4
=
y
CONFIG_NET_IPV6
=
y
CONFIG_TEST_RANDOM_GENERATOR
=
y
CONFIG_NET_NBUF_RX_COUNT
=
4
CONFIG_NET_NBUF_RX_COUNT
=
5
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