[riot-notifications] [RIOT-OS/RIOT] driver/enc28j60: cleanup (#9887)

Peter Kietzmann notifications at github.com
Mon Jan 7 18:26:25 CET 2019


To me the code change looks ok. I ran a simple test with an enc28j60 shield connected to a samr21-xpro using this change:
```diff
diff --git a/examples/gnrc_networking/Makefile b/examples/gnrc_networking/Makefile
index 86b7a94c14..a3250f4b42 100644
--- a/examples/gnrc_networking/Makefile
+++ b/examples/gnrc_networking/Makefile
@@ -40,6 +40,23 @@ USEMODULE += netstats_rpl
 # development process:
 DEVELHELP ?= 1
 
+ifneq (,$(filter samr21-xpro,$(BOARD)))
+    USEMODULE += enc28j60
+    GNRC_NETIF_NUMOF := 2
+
+# fallback: set SPI bus and pins to default values
+    ENC_SPI ?= SPI_DEV\(1\)
+    ENC_CS  ?= GPIO_PIN\(0,18\)
+    ENC_INT ?= GPIO_PIN\(0,28\)
+    ENC_RST ?= GPIO_PIN\(0,13\)
+    # export SPI and pins
+    CFLAGS += -DENC28J60_PARAM_SPI=$(ENC_SPI)
+    CFLAGS += -DENC28J60_PARAM_CS=$(ENC_CS)
+    CFLAGS += -DENC28J60_PARAM_INT=$(ENC_INT)
+    CFLAGS += -DENC28J60_PARAM_RESET=$(ENC_RST)
+endif
+
+
 # Uncomment the following 2 lines to specify static link lokal IPv6 address
 # this might be useful for testing, in cases where you cannot or do not want to
 # run a shell with ifconfig to get the real link lokal address.

```

Changing the MAC address of the device via `ifconfig 8 set addr 11:22:33:44:55:66` worked.

@kaspar030 are you still around? I think your comments were addressed. Please remove your change request.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/9887#issuecomment-452013002
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190107/7e44809c/attachment-0001.html>


More information about the notifications mailing list