'Register I2C-HAT digital input edge callback.'

def register_di_callback(self, address, channel, callback):

    with self._lock:
        i2c_hat = self._i2c_hats[address]
        self._di_scanner.register_callback(i2c_hat, channel, callback)
