         }
     }
 
-    func clearListeners(){
+    public func clearListeners(){
         (intFuncFalling,intFuncRaising,intFuncChange) = (nil,nil,nil)
         listening = false
     }

        }
    }

    func onChange(_ closure:(GPIO)->Void){
        intFuncChange = closure
        if intThread == nil {
            intThread = newInterruptThread()

public struct VirtualSPI : SPIOutput{
    let dataGPIO,clockGPIO:GPIO

    public init(dataGPIO:GPIO,clockGPIO:GPIO){
        self.dataGPIO = dataGPIO
        self.dataGPIO.direction = .OUT
        self.dataGPIO.value = 0
