def add_templates(): """This function is called when AsAutomatics initializes. It is used to construct all interface templates and assign them to the AsModule class for use when discovering interfaces in modules.""" # When new interfaces are developed and added, add the interface to # AsAutomatics using a copy of one of the lines below. AsModule.add_global_interface_template(AsStream()) AsModule.add_global_interface_template(AXIMasterMemoryInternal()) AsModule.add_global_interface_template(CameraInputOV7670()) AsModule.add_global_interface_template(AXISlaveRegisterInterface()) AsModule.add_global_interface_template(SlaveRegisterInterfaceTemplate())
def add_global_interface_template(template: Interface) -> bool: """! @brief Add a new interface template class to use for all modules that are imported. @param template: An instance of the interface template to add. Must inherit from the class Interface. @return True if the template was successfully added, False if a template of this name already exists.""" return AsModule.add_global_interface_template(template)