I tried to upload below program in Python for SPI communication with ad5592r.
handle0 = c_void_p(Mcp2210_OpenByIndex(vid, pid, index0, path0,
byref(pathsize0)));
But I am getting some errors while running the program. Please help to sort this problem.
pgpioDir = c_ushort( 0x00000140)
ret_code=mcp2210.Mcp2210_GetGpioPinDir(handle0,pgpioDir)
if ret_code != 0: #E_SUCCESS
print("Unexpected error code returned: ", errors_dict.get(ret_code, ret_code))
else:
print('i')
print ("MCP2210 #0 manufacturer descriptor is: ", pgpioDir.value)
print('k')
User contributions licensed under CC BY-SA 3.0