Skip to content
Snippets Groups Projects
Commit 5c8cb61d authored by Paulus Kruger's avatar Paulus Kruger
Browse files

some bugs fixed

parent fb088014
Branches
Tags
1 merge request!11Pypcc2
......@@ -4,7 +4,7 @@ description: "1234"
drivers:
- name: I2C
type: i2c
parameters: [1] #I2C port number
parameters: [4] #I2C port number
- name: I2C_CLK
type: i2c_dev #I2C devices
parent: I2C
......
......@@ -110,7 +110,7 @@ class i2c_dev(hwdev):
# print("Call Method",var1)
def i2csetget(self,*args,**kwargs):
self.conf['parentcls'].i2csetget(*args,**kwargs)
return self.conf['parentcls'].i2csetget(*args,**kwargs)
def SetSwitch(self,RCUi):
self.conf['parentcls'].SetSW1(self.RCU_Switch1[RCUi]);
......@@ -206,6 +206,7 @@ class i2c_dev(hwdev):
if devreg['store']:
devreg['storeval']=value[0];
l1=int(np.floor((width+bitoffset+7)/8))
print(value[0],width,bitoffset,l1)
if (width!=l1*8) or (bitoffset>0):
if (width<8):
for i in range(len(value)):
......
......@@ -32,10 +32,13 @@ I2Cclients.append(RCU_I2C)
#Load yaml so that we know the variable names
RCU_conf=yamlreader.yamlreader(RCU_I2C,yamlfile=name)
var1=RCU_conf.getvarid('CLK_PLL_locked_SPI')
var1=RCU_conf.getvarid('CLK_PLL_r3')
var1=RCU_conf.getvarid('CLK_PLL_locked')
RCU_I2C.readvar(var1,[])
var1=RCU_conf.getvarid('CLK_PLL_locked_SPI')
#var1=RCU_conf.getvarid('CLK_PLL_r3')
#RCU_I2C.readvar(var1,[])
#var1=RCU_conf.getmethodid('CLK_on');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment