lib/gpio & bcm2835: move single class from gpio to bcm2835
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 28 Aug 2015 17:17:51 +0000 (13:17 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 28 Aug 2015 18:15:10 +0000 (14:15 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/bcm2835/bcm2835.nit
lib/gpio.nit [deleted file]

index a7f9d69..dad9899 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Services to control the bcm2835 chipset as used in the Raspberry Pi
-# model B revision 1 Uses the C library by Mike McCauley from
-# http://www.airspayce.com/mikem/bcm2835/
+# Services to control the bcm2835 chipset used in the Raspberry Pi
+#
+# Uses the C library by Mike McCauley available at http://www.airspayce.com/mikem/bcm2835/
+#
+# This module targets the model B revision 1, it could be tweaked for other versions.
 module bcm2835
 
-import gpio
-
 in "C Header" `{
        #include <bcm2835.h>
 `}
@@ -31,6 +31,12 @@ redef class Object
        protected fun bcm2835_debug=(v: Bool) `{ bcm2835_set_debug(v); `}
 end
 
+# A physical binary pin
+interface Pin
+       # Set the output of this pin
+       fun write(high: Bool) is abstract
+end
+
 extern class RPiPin `{ RPiGPIOPin `}
        super Pin
 
diff --git a/lib/gpio.nit b/lib/gpio.nit
deleted file mode 100644 (file)
index cea53cb..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2013 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# GPIO related functionnalities
-module gpio
-
-# A physical binary pin
-interface Pin
-       # Set the output of this pin
-       fun write(high: Bool) is abstract
-end