Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
fd523c53
Commit
fd523c53
authored
Apr 05, 2019
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/network_wiznet5k: Automatically set MAC if device doesn't have one
parent
4f936afc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
ports/stm32/network_wiznet5k.c
ports/stm32/network_wiznet5k.c
+8
-0
No files found.
ports/stm32/network_wiznet5k.c
View file @
fd523c53
...
...
@@ -128,6 +128,14 @@ STATIC void wiznet5k_init(void) {
// Seems we need a small delay after init
mp_hal_delay_ms
(
250
);
// If the device doesn't have a MAC address then set one
uint8_t
mac
[
6
];
getSHAR
(
mac
);
if
((
mac
[
0
]
|
mac
[
1
]
|
mac
[
2
]
|
mac
[
3
]
|
mac
[
4
]
|
mac
[
5
])
==
0
)
{
mp_hal_get_mac
(
MP_HAL_MAC_ETH0
,
mac
);
setSHAR
(
mac
);
}
// Hook the Wiznet into lwIP
wiznet5k_lwip_init
(
&
wiznet5k_obj
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment