mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-12-22 07:18:52 -05:00
Introduce and use gcn64lib_bootloader function
This commit is contained in:
parent
41f2d359b8
commit
83a655e045
@ -136,3 +136,16 @@ int gcn64lib_8bit_scan(gcn64_hdl_t hdl, unsigned char min, unsigned char max)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gcn64lib_bootloader(gcn64_hdl_t hdl)
|
||||
{
|
||||
unsigned char cmd[4];
|
||||
int cmdlen;
|
||||
|
||||
cmd[0] = RQ_GCN64_JUMP_TO_BOOTLOADER;
|
||||
cmdlen = 1;
|
||||
|
||||
gcn64_exchange(hdl, cmd, cmdlen, cmd, sizeof(cmd));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ int gcn64lib_setConfig(gcn64_hdl_t hdl, unsigned char param, unsigned char *data
|
||||
int gcn64lib_getConfig(gcn64_hdl_t hdl, unsigned char param, unsigned char *rx, unsigned char rx_max);
|
||||
int gcn64lib_rawSiCommand(gcn64_hdl_t hdl, unsigned char channel, unsigned char *tx, unsigned char tx_len, unsigned char *rx, unsigned char max_rx);
|
||||
int gcn64lib_getVersion(gcn64_hdl_t hdl, char *dst, int dstmax);
|
||||
int gcn64lib_bootloader(gcn64_hdl_t hdl);
|
||||
|
||||
int gcn64lib_8bit_scan(gcn64_hdl_t hdl, unsigned char min, unsigned char max);
|
||||
int gcn64lib_16bit_scan(gcn64_hdl_t hdl, unsigned short min, unsigned short max);
|
||||
|
@ -319,9 +319,7 @@ int main(int argc, char **argv)
|
||||
|
||||
case OPT_BOOTLOADER:
|
||||
printf("Sending 'jump to bootloader' command...");
|
||||
cmd[0] = RQ_GCN64_JUMP_TO_BOOTLOADER;
|
||||
cmdlen = 1;
|
||||
do_exchange = 1;
|
||||
gcn64lib_bootloader(hdl);
|
||||
break;
|
||||
|
||||
case OPT_SUSPEND_POLLING:
|
||||
|
Loading…
Reference in New Issue
Block a user