Bridge 1.1 API - I2C Commands

Set Bus Voltage

  • 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"
        }
      }

I2C Set Parameters

  • 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"
        }
      }

I2C Read

  • 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"])>
        }
      }

I2C Write

  • 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"
        }
      }

I2C Read Using Subaddress

  • 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"])>
        }
      }

I2C Write Using Subaddress

  • 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"
        }
      }

Last updated