@@ -0,0 +1,1015 @@
+#%0A# ------------------------------------------------------------%0A# Copyright (c) SILAB , Physics Institute of Bonn University%0A# ------------------------------------------------------------%0A#%0A# SVN revision information:%0A#  $Rev::                       $:%0A#  $Author::                    $:%0A#  $Date::                      $:%0A#%0A%0Afrom HL.HardwareLayer import HardwareLayer%0A%0A%0Aclass fast_spi_rx(HardwareLayer):%0A%0A    def __init__(self, intf, conf):%0A        HardwareLayer.__init__(self, intf, conf)%0A%0A    def init(self):%0A        self.reset()%0A%0A    def reset(self):%0A        self._intf.write(self._conf%5B'base_addr'%5D, %5B0%5D)%0A%0A    def set_en(self, value=True):%0A        current = self._intf.read(self._conf%5B'base_addr'%5D + 2, 1)%5B0%5D%0A        self._intf.write(self._conf%5B'base_addr'%5D + 2, %5B(current & 0xfe) %7C value%5D)%0A    %0A    def get_en(self):%0A        return True if (self._intf.read(self._conf%5B'base_addr'%5D + 2, 1)%5B0%5D & 0x01) else False%0A%0A    def get_lost_count(self):%0A        return self._intf.read(self._conf%5B'base_addr'%5D + 3, 1)%5B0%5D%0A

add keyword property