Use uhk.writeDevice() in set-i2c-baud-rate.js
This commit is contained in:
@@ -17,8 +17,7 @@ You're free to use any value in between and test the results.`);
|
|||||||
}
|
}
|
||||||
|
|
||||||
let bps = process.argv[2];
|
let bps = process.argv[2];
|
||||||
let buffer = new Buffer([uhk.usbCommands.setI2cBaudRate, ...uhk.uint32ToArray(+bps)]);
|
|
||||||
//console.log(buffer);
|
(async function() {
|
||||||
device.write(uhk.getTransferData(buffer));
|
await uhk.writeDevice(device, [uhk.usbCommands.setI2cBaudRate, ...uhk.uint32ToArray(+bps)]);
|
||||||
let response = device.readSync();
|
})();
|
||||||
//console.log(Buffer.from(response));
|
|
||||||
|
|||||||
Reference in New Issue
Block a user