Commit 8b90e736c43887b8a10956b8188f260e30ac2b6a

Authored by bmarechal
1 parent a60abb54d7
Exists in master

add pinc/poff args

Showing 1 changed file with 7 additions and 2 deletions Inline Diff

redpitaya/server/liboscimp_fpga.py
import ctypes 1 1 import ctypes
lib = ctypes.CDLL('/usr/lib/liboscimp_fpga.so') 2 2 lib = ctypes.CDLL('/usr/lib/liboscimp_fpga.so')
3 3
def add_const_set_offset(device, offset): 4 4 def add_const_set_offset(device, offset):
lib.add_const_set_offset(device, offset) 5 5 lib.add_const_set_offset(device, offset)
6 6
def nco_counter_send_conf(device, freq_ref, freq_dds, acc_size, offset): 7 7 def nco_counter_send_conf(device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw):
lib.nco_counter_send_conf(device, freq_ref, freq_dds, acc_size, offset) 8 8 lib.nco_counter_send_conf(device, freq_ref, freq_dds, acc_size, offset, pinc_sw, poff_sw)
9 9
10 def fir16bits_send_conf(device, fileCoeff, coeffSize):
11 lib.fir16bits_send_conf(device, fileCoeff, coeffSize)
12
13 '''~
def fpga_send(fpga_dev, registre, value): 10 14 def fpga_send(fpga_dev, registre, value):
lib.fpga_send(fpga_dev, registre, value) 11 15 lib.fpga_send(fpga_dev, registre, value)
12 16
def fpga_read(fpga_dev, registre): 13 17 def fpga_read(fpga_dev, registre):
lib.fpga_read(fpga_dev, registre) 14 18 lib.fpga_read(fpga_dev, registre)
15 19
def fpga_read32(fpga_dev, registre): 16 20 def fpga_read32(fpga_dev, registre):
lib.fpga_read32(fpga_dev, registre) 17 21 lib.fpga_read32(fpga_dev, registre)
18 22
def fpga_close(fpga_device): 19 23 def fpga_close(fpga_device):
lib.fpga_close(fpga_dev) 20 24 lib.fpga_close(fpga_dev)
21 25
def fpga_open(fpga_dev, fpga_address, fpga_offset): 22 26 def fpga_open(fpga_dev, fpga_address, fpga_offset):
lib.fpga_open(fpga_dev, fpga_address, fpga_offset) 23 27 lib.fpga_open(fpga_dev, fpga_address, fpga_offset)
24 28