Last updated 4 days ago
See .
Command Request:
{ "transaction_id": "1", "command": "spi_init", "params": { { "mode": "<0..3>", "clockFrequencyInKHz": "<Unsigned Integer>", "bitOrder": "<MSB|LSB>", "bitsPerTransfer": "<8|16>", "chipSelect": "<0..3>", "chipSelectPol": "<0,1>" } } }
Responses:
Immediate Promise Response:
{ "transaction_id": "1", "status": "success", "type": "command_response", "is_promise": true, "data": { "command": "spi_init" } }
Final Response:
{ "transaction_id": "1", "status": "success", "type": "command_response", "is_promise": false, "data": { "is_response_to": "spi_init", "status": "success" } }
{ "transaction_id": "1", "command": "spi_config", "params": { { "mode": "<0..3>", "clockFrequencyInKHz": "<Unsigned Integer>", "bitOrder": "<MSB|LSB>", "bitsPerTransfer": "<8|16>", "chipSelect": "<0..3>", "chipSelectPol": "<0,1>" } } }
{ "transaction_id": "1", "status": "success", "type": "command_response", "is_promise": true, "data": { "command": "spi_config" } }
{ "transaction_id": "1", "status": "success", "type": "command_response", "is_promise": false, "data": { "is_response_to": "spi_config", "status": "success" } }
{ "transaction_id": "1", "command": "spi_transfer", "params": { "bytesToRead": "<Unsigned Integer>", "writeBuffer": "<Hex String (e.g. DEADBEEF)>" } } }
{ "transaction_id": "1", "status": "success", "type": "command_response", "is_promise": true, "data": { "command": "spi_transfer" } }
{ "transaction_id": "1", "status": "success", "is_promise": false, "data": { "is_response_to": "spi_transfer", "status": "success", "payload_length": <Unsigned Integer>, "data": <Array of 2-Byte Hex String (e.g. "DE", "AD", "BE", "EF")>} } }