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

some bugs fixed

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