'Register I2C-HAT.'

def register_board(self, board, address):

    with self._lock:
        i2c_hat = self._i2c_hats.get(address)
        if (i2c_hat is None):
            import raspihats.i2c_hats as module
            constructor = getattr(module, board)
            i2c_hat = constructor(address)
            setattr(i2c_hat, self._CALLBACKS, {})
            setattr(i2c_hat, self._EXCEPTION, None)
            self._di_scanner.setup(i2c_hat)
            self._i2c_hats[address] = i2c_hat
            status_word = i2c_hat.status
            _LOGGER.info(log_message(self, i2c_hat, 'registered', status_word))
