]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - include/z180-serv.h
add fat command mv
[z180-stamp.git] / include / z180-serv.h
index 5385ecd9df21b43c1e79efc36fc9b3a440e4d73f..760fa044e6e0955604c704e2dafbe91f5040ff72 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef Z180_SERV_H
 #define Z180_SERV_H
 
+#include <stdint.h>
 #include <stdbool.h>
 #include "ff.h"
 
@@ -25,26 +26,18 @@ typedef uint8_t drv_opt_t;
 #define DRV_OPT_DEBUG          (1<<1)  /* Debug this drive */
 #define DRV_OPT_REATTATCH      (1<<7)  /* Change existing attachment */
 
+typedef uint8_t drv_flag_t;
+#define DRV_FLG_OPEN           (1<<0)  /* Drive is logged in from CP/M */
+#define DRV_FLG_DIRTY          (2<<0)  /* Unwritten data */
+
 struct cpm_drive_s {
        drv_opt_t       opt;
-       bool            dirty;
+       drv_flag_t      flags;
        uint32_t        dph;
        char            *img_name;
        FIL                     fd;
 };
 
-/* Return codes */
-
-#define AT_OK          0
-#define AT_ERROR       1
-#define AT_RANGE       2
-#define AT_ALREADY     3
-#define AT_NOT         4
-#define AT_NOFILE      5
-#define AT_NOMEM       6
-#define AT_OPEN                7
-#define AT_OTHER       8
-
 
 int drv_list(void);
 int drv_detach(uint8_t drv);