From 18c6824b38dac8bc1343aa5acca125f2fe6af331 Mon Sep 17 00:00:00 2001
From: Hauke Petersen <hauke.petersen@fu-berlin.de>
Date: Fri, 5 Aug 2016 14:50:45 +0200
Subject: [PATCH] boards/arduino-due: added config for W5100 shields

---
 boards/arduino-due/include/w5100_params.h | 62 +++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 boards/arduino-due/include/w5100_params.h

diff --git a/boards/arduino-due/include/w5100_params.h b/boards/arduino-due/include/w5100_params.h
new file mode 100644
index 0000000000..131bed8ec8
--- /dev/null
+++ b/boards/arduino-due/include/w5100_params.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+/**
+ * @ingroup     boards_arduino-due
+ * @{
+ *
+ * @file
+ * @brief       Parameters for W5100 Arduino Ehternet Shields (v4 and v5)
+ *
+ * @author      Hauke Petersen <hauke.petersen@fu-berlin.de>
+ */
+
+#ifndef W5100_PARAMS_H
+#define W5100_PARAMS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief   Set configuration parameters for the W5100 driver
+ * @{
+ */
+#ifndef W5100_PARAM_SPI
+#define W5100_PARAM_SPI         (SPI_0)
+#endif
+#ifndef W5100_PARAM_SPI_SPEED
+#define W5100_PARAM_SPI_SPEED   (SPI_SPEED_5MHZ)
+#endif
+#ifndef W5100_PARAM_CS
+#define W5100_PARAM_CS          (GPIO_PIN(2, 29))
+#endif
+#ifndef W5100_PARAM_EVT
+#define W5100_PARAM_EVT         (GPIO_PIN(1, 25))
+#endif
+/** @} */
+
+/**
+ * @brief   W5100 configuration instance
+ */
+static const  w5100_params_t w5100_params[] = {
+    {
+        .spi       = W5100_PARAM_SPI,
+        .spi_speed = W5100_PARAM_SPI_SPEED,
+        .cs        = W5100_PARAM_CS,
+        .evt       = W5100_PARAM_EVT
+    },
+};
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* W5100_PARAMS_H */
+/** @} */
-- 
GitLab