Skip to content

Commit 7ff9233

Browse files
authored
CoCo: Fix fuji_set_directory_position (#41)
1 parent 5da0f52 commit 7ff9233

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

coco/src/fn_fuji/fuji_set_directory_position.c

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66

77
bool fuji_set_directory_position(uint16_t pos)
88
{
9-
/* TODO, implement */
10-
return false;
11-
}
9+
struct _sdp
10+
{
11+
uint8_t opcode;
12+
uint8_t cmd;
13+
uint16_t pos;
14+
} sdp;
15+
16+
sdp.opcode = OP_FUJI;
17+
sdp.cmd = FUJICMD_SET_DIRECTORY_POSITION;
18+
sdp.pos = pos;
19+
20+
bus_ready();
21+
22+
dwwrite((uint8_t *)&sdp, sizeof(sdp));
23+
if (fuji_get_error())
24+
return false;
25+
26+
return true;
27+
}

fujinet-fuji.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#ifdef _CMOC_VERSION_
99
#include <cmoc.h>
10+
#include <coco.h>
1011

1112
#ifndef bool
1213
#define bool _FNBool

0 commit comments

Comments
 (0)