C MIP-SDK
|
Functions | |
u16 | mip_base_cmd_ping (mip_interface *device_interface) |
u16 | mip_base_cmd_idle (mip_interface *device_interface) |
u16 | mip_base_cmd_get_device_info (mip_interface *device_interface, base_device_info_field *device_info) |
u16 | mip_base_cmd_get_device_supported_descriptors (mip_interface *device_interface, u8 *response_buffer, u16 *response_size) |
u16 | mip_base_cmd_built_in_test (mip_interface *device_interface, u32 *bit_result) |
u16 | mip_base_cmd_resume (mip_interface *device_interface) |
u16 | mip_base_cmd_reset_device (mip_interface *device_interface) |
u16 mip_base_cmd_built_in_test | ( | mip_interface * | device_interface, |
u32 * | bit_result | ||
) |
Perform the device's built-in test.
[in] | mip_interface | *device_interface - The device interface. |
[out] | u32 | *bit_result - The returned bitfield result. |
MIP_INTERFACE_ERROR | When there is a problem with the command format or the the device communications failed. |
MIP_INTERFACE_OK | The command was successful. |
Please consult the device DCP for descriptions of BIT result values.
A value of 0x00000000 is always success, other values indicate an error.
u16 mip_base_cmd_get_device_info | ( | mip_interface * | device_interface, |
base_device_info_field * | device_info | ||
) |
Get the device information structure.
[in] | mip_interface | *device_interface - The device interface. |
[out] | base_device_info_field | *device_info - The returned device info structure. |
MIP_INTERFACE_ERROR | When there is a problem with the command format or the the device communications failed. |
MIP_INTERFACE_OK | The command was successful. |
None
u16 mip_base_cmd_get_device_supported_descriptors | ( | mip_interface * | device_interface, |
u8 * | response_buffer, | ||
u16 * | response_size | ||
) |
Get the descriptors supported by the device.
[in] | mip_interface | *device_interface - The device interface. |
[out] | u8 | *response_buffer - The returned array of descriptors. |
[in,out] | u16 | *response_size - On entry, the size of the buffer; On exit, the size of the data returned. |
MIP_INTERFACE_ERROR | When there is a problem with the command format or the the device communications failed. |
MIP_INTERFACE_OK | The command was successful. |
The provided buffer should be large enough to hold the maximum number of
supported descriptors from any device (currently 126.) This would be a
buffer of at least 252 bytes. The returned descriptors are in the format
of u16 = [descriptor set (MSB), descriptor (LSB)].
u16 mip_base_cmd_idle | ( | mip_interface * | device_interface | ) |
u16 mip_base_cmd_ping | ( | mip_interface * | device_interface | ) |
u16 mip_base_cmd_reset_device | ( | mip_interface * | device_interface | ) |
Reset the attached device.
[in] | mip_interface | *device_interface - The device interface. |
MIP_INTERFACE_ERROR | When there is a problem with the command format or the the device communications failed. |
MIP_INTERFACE_OK | The command was successful. |
If communicating via USB, it is important to close the port immediately after
calling this function. Failure to do so may result in the designated port
hanging.
u16 mip_base_cmd_resume | ( | mip_interface * | device_interface | ) |
Resume any enabled continuous data streams. This is the reverse of idle
.
[in] | mip_interface | *device_interface - The device interface. |
MIP_INTERFACE_ERROR | When there is a problem with the command format or the the device communications failed. |
MIP_INTERFACE_OK | The command was successful. |
None