Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions coco/src/fn_fuji/fuji_copy_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@

bool fuji_copy_file(uint8_t src_slot, uint8_t dst_slot, char *copy_spec)
{
// TODO: Implement in firmware.
return BUS_ERROR;
struct _cf
{
uint8_t opcode;
uint8_t cmd;
uint8_t src_slot;
uint8_t dst_slot;
char copy_spec[256];
} cf;

cf.opcode = OP_FUJI;
cf.cmd = FUJICMD_COPY_FILE;
cf.src_slot = src_slot;
cf.dst_slot = dst_slot;
strcpy(cf.copy_spec, copy_spec);

bus_ready();

dwwrite((uint8_t *)&cf, sizeof(cf));

return !fuji_get_error();
}