diff --git a/coco/src/fn_fuji/fuji_copy_file.c b/coco/src/fn_fuji/fuji_copy_file.c index 322cad4..06d5031 100644 --- a/coco/src/fn_fuji/fuji_copy_file.c +++ b/coco/src/fn_fuji/fuji_copy_file.c @@ -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(); }