# Path: basil/HL/RegisterHardwareLayer.py
# class RegisterHardwareLayer(HardwareLayer):
#     def __init__(self, intf, conf):
#     def init(self):
#     def set_value(self, value, addr, size, offset, **kwargs):
#     def get_value(self, addr, size, offset, **kwargs):
#     def set_bytes(self, data, addr, **kwargs):
#     def get_bytes(self, addr, size, **kwargs):
#     def set_configuration(self, conf):
#     def get_configuration(self):
#     def add_property(self, attribute):
#         def getter(self):
#         def setter(self, value):
#     def set_default(self):
#     def _get(self, reg):
#     def _set(self, reg, value):
#     def __getitem__(self, name):
#     def __setitem__(self, name, value):
#     def __getattr__(self, name):
#         def method(*args, **kwargs):
#     def __setattr__(self, name, value):


import logging
from basil.HL.RegisterHardwareLayer import HardwareLayer
        super(FadcConf, self).__init__(intf, conf)

    def init(self):
        super(FadcConf, self).init()
        logger.info("Initializing FADC Configuration...")

        self._intf.set_data([0x00, 0x10])  # RESET ADC
        self._intf.start()
        while not self._intf.is_done():
            pass

        self._intf.set_data([0x02, 0x07])  # SET 16 bit mode
        self._intf.start()
        while not self._intf.is_done():
            pass

        self._intf.set_data([0x03, 0x00])  # PATTERN OFF
        self._intf.start()
        while not self._intf.is_done():
            pass

    def enable_pattern(self, pattern):
        self._intf.set_data([0x03, 0x80 | ((pattern & 0x3f00) >> 8)])
        self._intf.start()
        while not self._intf.is_done():
            pass

        self._intf.set_data([0x04, pattern & 0xff])
        self._intf.start()
        while not self._intf.is_done():

# Path: basil/HL/RegisterHardwareLayer.py
# class RegisterHardwareLayer(HardwareLayer):
#     def __init__(self, intf, conf):
#     def init(self):
#     def set_value(self, value, addr, size, offset, **kwargs):
#     def get_value(self, addr, size, offset, **kwargs):
#     def set_bytes(self, data, addr, **kwargs):
#     def get_bytes(self, addr, size, **kwargs):
#     def set_configuration(self, conf):
#     def get_configuration(self):
#     def add_property(self, attribute):
#         def getter(self):
#         def setter(self, value):
#     def set_default(self):
#     def _get(self, reg):
#     def _set(self, reg, value):
#     def __getitem__(self, name):
#     def __setitem__(self, name, value):
#     def __getattr__(self, name):
#         def method(*args, **kwargs):
#     def __setattr__(self, name, value):


# Path: basil/HL/FadcConf.py
import logging
from basil.HL.RegisterHardwareLayer import HardwareLayer

        super(FadcConf, self).__init__(intf, conf)

    def init(self):
        super(FadcConf, self).init()
        logger.info("Initializing FADC Configuration...")

        self._intf.set_data([0x00, 0x10])  # RESET ADC
        self._intf.start()
        while not self._intf.is_done():
            pass

        self._intf.set_data([0x02, 0x07])  # SET 16 bit mode
        self._intf.start()
        while not self._intf.is_done():
            pass

        self._intf.set_data([0x03, 0x00])  # PATTERN OFF
        self._intf.start()
        while not self._intf.is_done():
            pass

    def enable_pattern(self, pattern):
        self._intf.set_data([0x03, 0x80 | ((pattern & 0x3f00) >> 8)])
        self._intf.start()
        while not self._intf.is_done():
            pass

        self._intf.set_data([0x04, pattern & 0xff])
        self._intf.start()
        while not self._intf.is_done():

            pass