def del_interrupt_callback(self, gpio_id):
        """ Delete all interrupt callbacks from a certain gpio """
        debug("- removing interrupts on gpio %s" % gpio_id)
        gpio_id = _GPIO.channel_to_gpio(gpio_id)
        fileno = self._map_gpioid_to_fileno[gpio_id]

        # 1. Remove from epoll
        self._epoll.unregister(fileno)

        # 2. Cache the file
        f = self._map_fileno_to_file[fileno]

        # 3. Remove from maps
        del self._map_fileno_to_file[fileno]
        del self._map_fileno_to_gpioid[fileno]
        del self._map_fileno_to_options[fileno]
        del self._map_gpioid_to_fileno[gpio_id]
        del self._map_gpioid_to_callbacks[gpio_id]

        # 4. Close file last in case of IOError
        f.close()
def del_interrupt_callback ( self , gpio_id ) : debug ( "- removing interrupts on gpio %s" % gpio_id ) gpio_id = _GPIO . channel_to_gpio ( gpio_id ) fileno = self . _map_gpioid_to_fileno [ gpio_id ] self . _epoll . unregister ( fileno ) f = self . _map_fileno_to_file [ fileno ] del self . _map_fileno_to_file [ fileno ] del self . _map_fileno_to_gpioid [ fileno ] del self . _map_fileno_to_options [ fileno ] del self . _map_gpioid_to_fileno [ gpio_id ] del self . _map_gpioid_to_callbacks [ gpio_id ] f . close ( )
Delete all interrupt callbacks from a certain gpio