Logo Search packages:      
Sourcecode: u3-tool version File versions

int u3_chip_info ( u3_handle_t device,
struct chip_info *  info 

Request chip information

This request some information about the USB chip used on the device.

device U3 device handle
info Pointer to structure used to return requested info.
U3_SUCCESS if successful, else U3_FAILURE and an error string can be obtained using u3_error()
See also:
'struct chip_info'

Definition at line 372 of file u3_commands.c.

References u3_send_cmd().

      uint8_t status;
      uint8_t cmd[U3_CMD_LEN] = {
            0xff, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
            0x00, 0x00, 0x00, 0x00
      memset(info, 0, sizeof(struct chip_info));
      if (u3_send_cmd(device, cmd, U3_DATA_FROM_DEV, sizeof(struct chip_info),
            (uint8_t *)info, &status) != U3_SUCCESS)
            return U3_FAILURE;

      if (status != 0) {
            u3_set_error(device, "Device reported command failed: status %d", status);
            return U3_FAILURE;

      return U3_SUCCESS;

Generated by  Doxygen 1.6.0   Back to index