mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-22 20:39:42 +02:00
let strtoul auto deal '0x' and decimal string
correct the request type in usb_control_msg should USB_ENDPOINT_IN Signed-off-by: Xiangfu Liu <xiangfu.z@gmail.com>
This commit is contained in:
parent
77c50470f6
commit
efed24a9a2
@ -203,13 +203,10 @@ int main(int argc, char** argv)
|
|||||||
fprintf(stderr, "Error - number of %s parameters %i\n", argv[1], argc);
|
fprintf(stderr, "Error - number of %s parameters %i\n", argv[1], argc);
|
||||||
goto xout_xburst_interface;
|
goto xout_xburst_interface;
|
||||||
}
|
}
|
||||||
if (argv[2][0] == '0' && argv[2][1] == 'x')
|
u32_param = strtoul(argv[2], 0 /* endptr */, 0 /* base */);
|
||||||
u32_param = strtoul(&argv[2][2], 0 /* endptr */, 16 /* base */);
|
|
||||||
else
|
|
||||||
u32_param = strtoul(argv[2], 0 /* endptr */, 10 /* base */);
|
|
||||||
|
|
||||||
usb_status = usb_control_msg(xburst_h,
|
usb_status = usb_control_msg(xburst_h,
|
||||||
/* requesttype */ USB_ENDPOINT_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
/* requesttype */ USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||||
/* request */ request_type,
|
/* request */ request_type,
|
||||||
/* value */ HIWORD(u32_param),
|
/* value */ HIWORD(u32_param),
|
||||||
/* index */ LOWORD(u32_param),
|
/* index */ LOWORD(u32_param),
|
||||||
@ -225,7 +222,7 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
case VR_FLUSH_CACHES: {
|
case VR_FLUSH_CACHES: {
|
||||||
usb_status = usb_control_msg(xburst_h,
|
usb_status = usb_control_msg(xburst_h,
|
||||||
/* requesttype */ USB_ENDPOINT_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
/* requesttype */ USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||||
/* request */ VR_FLUSH_CACHES,
|
/* request */ VR_FLUSH_CACHES,
|
||||||
/* value */ 0,
|
/* value */ 0,
|
||||||
/* index */ 0,
|
/* index */ 0,
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
../host-app/xbboot set_addr 0x80002000
|
../host-app/xbboot set_addr 0x80002000
|
||||||
../host-app/xbboot bulk_write ../target-stage1/stage1.bin
|
../host-app/xbboot bulk_write ../target-stage1/stage1.bin
|
||||||
../host-app/xbboot start1 0x80002000
|
../host-app/xbboot start1 0x80002000
|
||||||
|
../host-app/xbboot get_info
|
||||||
../host-app/xbboot set_addr 0x81c00000
|
../host-app/xbboot set_addr 0x81c00000
|
||||||
../host-app/xbboot bulk_write ../target-echokernel/echo-kernel.bin
|
../host-app/xbboot bulk_write ../target-echokernel/echo-kernel.bin
|
||||||
../host-app/xbboot flush_cache
|
../host-app/xbboot flush_cache
|
||||||
|
Loading…
Reference in New Issue
Block a user