Skip to content

Bridge 1.1 API - I2C Commands

  • Command Request:

    {
    "transaction_id": "1",
    "command": "i2c_spi_uart_set_bus_voltage",
    "params": {
    "busVoltageInV": "<Float>"
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "i2c_spi_uart_set_bus_voltage"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "i2c_spi_uart_set_bus_voltage",
      "status": "success"
      }
      }
  • Command Request:

    {
    "transaction_id": "1",
    "command": "i2c_set_parameters",
    "params": {
    "clockFrequencyInKHz": "<Unsigned Int>"
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "i2c_set_parameters"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "i2c_set_parameters",
      "status": "success"
      }
      }
  • Command Request:

    {
    "transaction_id": "1",
    "command": "i2c_read",
    "params": {
    "address": "<2-Digit Hexadecimal (E.g. 0A)>",
    "bytesToRead": "<Unsigned Integer>",
    "busVoltageInV": "<Float>"
    }
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "i2c_read"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "i2c_read",
      "status": "success",
      "data": <Array of 2-Digit Hex (E.g. ["DE", "AD", "BE", "EF"])>
      }
      }
  • Command Request:

    {
    "transaction_id": "1",
    "command": "i2c_write",
    "params": {
    "address": "<2-Digit Hexadecimal (E.g. 0A)>",
    "writeBuffer": "<Hexadecimal String (E.g. DEADBEEF, A1B3C3D4F5)>",
    "clockFrequencyInKHz": "Unsigned Integer"
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "i2c_write"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "i2c_write",
      "status": "success"
      }
      }
  • Command Request:

    {
    "transaction_id": "1",
    "command": "i2c_read_using_subaddress",
    "params": {
    "address": "<2-Digit Hexadecimal (E.g. 0A)>",
    "subaddress": "<Unsigned Integer (E.g. 0001)>",
    "bytesToRead": "<Unsigned Integer>",
    "busVoltageInV": "<Float>"
    }
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "i2c_read_using_subaddress"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "i2c_read_using_subaddress",
      "status": "success",
      "data": <Array of 2-Digit Hex (E.g. ["DE", "AD", "BE", "EF"])>
      }
      }
  • Command Request:

    {
    "transaction_id": "1",
    "command": "i2c_write_using_subaddress",
    "params": {
    "address": "<2-Digit Hexadecimal (E.g. 0A)>",
    "subaddress": "<Unsigned Integer (E.g. 0001)>",
    "writeBuffer": "<Hexadecimal String (E.g. DEADBEEF, A1B3C3D4F5)>",
    "clockFrequencyInKHz": "Unsigned Integer"
    }
    }
  • Responses:

    • Immediate Promise Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": true,
      "data": {
      "command": "i2c_write_using_subaddress"
      }
      }
    • Final Response:

      {
      "transaction_id": "1",
      "status": "success",
      "type": "command_response",
      "is_promise": false,
      "data": {
      "is_response_to": "i2c_write_using_subaddress",
      "status": "success"
      }
      }