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

int u3_data_partition_info ( u3_handle_t device,
struct dpart_info info 

Request data partition information

This request some information about the data partition

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 dpart_info'

Definition at line 349 of file u3_commands.c.

References u3_send_cmd().

      uint8_t status;
      uint8_t cmd[U3_CMD_LEN] = {
            0xff, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
            0x00, 0x00, 0x00, 0x00
      memset(info, 0, sizeof(struct dpart_info));
      if (u3_send_cmd(device, cmd, U3_DATA_FROM_DEV, sizeof(struct dpart_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