From 085cd48e3da72626b16155a8347380c26074f2be Mon Sep 17 00:00:00 2001
From: Hauke Petersen <hauke.petersen@fu-berlin.de>
Date: Wed, 17 Feb 2016 10:27:10 +0100
Subject: [PATCH] drivers/gpio: changed default type to unsigned

---
 drivers/include/periph/gpio.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/include/periph/gpio.h b/drivers/include/periph/gpio.h
index 6a7b549e6a..c91dda1f64 100644
--- a/drivers/include/periph/gpio.h
+++ b/drivers/include/periph/gpio.h
@@ -53,6 +53,8 @@
 #ifndef GPIO_H
 #define GPIO_H
 
+#include <limits.h>
+
 #include "periph_cpu.h"
 #include "periph_conf.h"
 /* TODO: remove once all platforms are ported to this interface */
@@ -73,14 +75,14 @@ extern "C" {
  * @brief   Define global value for GPIO not defined
  */
 #ifndef GPIO_UNDEF
-#define GPIO_UNDEF      (-1)
+#define GPIO_UNDEF          (UINT_MAX)
 #endif
 
 /**
  * @brief   Define the default GPIO type identifier
  */
 #ifndef HAVE_GPIO_T
-typedef int gpio_t;
+typedef unsigned int gpio_t;
 #endif
 
 /**
-- 
GitLab