_CAL_SUPPORTED_DEVICES = ['ATECC108A', 'ATECC508A', 'ATECC608A', 'ATSHA204A']
def loadModule():
cryptoAuthLib = Module.CreateSharedComponent("cryptoauthlib", "CryptoAuthLib", "/Libraries", "/harmony/config/cryptoauthlib.py")
cryptoAuthLib.setDisplayType("Crypto Authentication Library")
cryptoAuthLib.addCapability("CAL_LIB_CAP", "CA_LIB", True)
cryptoAuthLib.addDependency("FreeRTOS", "RTOS", True, False)
cryptoAuthLib.addDependency("WolfSSL_Crypto_Dependency", "LIB_WOLFCRYPT", None, False, False)
cryptoAuthLib = Module.CreateSharedComponent("cryptoauthlib_tng", "CryptoAuthLib: Trust&Go", "/Libraries", "/harmony/config/tng.py")
cryptoAuthLib.setDisplayType("TNGTLS & TNGLORA Certificates")
cryptoAuthLib.addDependency("CAL_LIB_CAP", "CA_LIB", True, False)
for dev in _CAL_SUPPORTED_DEVICES:
comp = Module.CreateGeneratorComponent(dev.lower(), dev, "/Harmony/Drivers/Crypto", "/harmony/config/device_common.py", "/harmony/config/device_instance.py")
comp.addDependency("cryptoauthlib", "CA_LIB", True, False)
comp.addMultiDependency('{}_DEP_PLIB_I2C'.format(dev.upper()), 'I2C', 'I2C', True)