E
I've made some steps. Code looks now like :
def cam_spi_write_register(addrs, value, spi, cs):
mask = b'\x80'
addres = bytes([mask[0] | addrs[0]])
cs.value(0)
spi.write(addres[0])
machin
spi.write(value[0])
cs.value(1)
def cam_spi_read_single(addrs, spi, cs):
cs.value(0)
spi.write(addrs[0])
buf = spi.read(1)
cs.value(1)
print(buf)
return(buf)
but it still don't work. I made it working for a while but i forgot to push it on my repo and all code is lost...