diff options
author | Leo C | 2018-09-03 12:03:37 +0200 |
---|---|---|
committer | Leo C | 2018-09-04 21:26:04 +0200 |
commit | 5e8ac5e02a09140e97d56a9d5313504dfa31282d (patch) | |
tree | 87f6d50ce22abf3d49722da9a1f7111de812211b /include | |
parent | 86ee5f8bc4c5a4c204be6fff004ef6bf6b839dcd (diff) | |
download | z180-stamp-5e8ac5e02a09140e97d56a9d5313504dfa31282d.zip |
cmd_attach.c, cmd_boot.c, cmd_loadcpm3.c: use cmd_error()
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 11 | ||||
-rw-r--r-- | include/config.h | 1 | ||||
-rw-r--r-- | include/errnum.h | 15 | ||||
-rw-r--r-- | include/z180-serv.h | 12 |
4 files changed, 20 insertions, 19 deletions
diff --git a/include/common.h b/include/common.h index eb38853..12d87c4 100644 --- a/include/common.h +++ b/include/common.h @@ -12,6 +12,7 @@ #include <stdbool.h> #include <string.h> #include <stdlib.h> +#include "errnum.h" #define GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) @@ -82,18 +83,18 @@ extern volatile uint_least8_t Stat; #define S_CON_PENDING (1<<2) static inline -void my_puts(const char *s) +int my_puts(const char *s) { - fputs(s, stdout); + return fputs(s, stdout); } static inline -void my_puts_P(const char *s) +int my_puts_P(const char *s) { #ifdef __AVR__ - fputs_P(s, stdout); + return fputs_P(s, stdout); #else - fputs(s, stdout); + return fputs(s, stdout); #endif /* __AVR__ */ } diff --git a/include/config.h b/include/config.h index d989772..6640e67 100644 --- a/include/config.h +++ b/include/config.h @@ -44,6 +44,7 @@ #define CONFIG_CPM3_BANKED_BASE_STR "0" #define CONFIG_CPM_MAX_DRIVE 8 +#define CONFIG_CPM_MAX_DRNR_STR "7" #define CONFIG_CPM_BASE_DRIVE 'A' #define CONFIG_CPM_BLOCK_SIZE 512 diff --git a/include/errnum.h b/include/errnum.h index 5de8f2b..adb8a80 100644 --- a/include/errnum.h +++ b/include/errnum.h @@ -10,8 +10,19 @@ #include "errnum.h" typedef enum { - ENOMEM = 101, - EBUSTO + ESUCCESS = 0, + ENOMEM = 101, + EBUSTO, + EUNEXPARG, + EATRANGE, + EATALRDY, + EATNOT, + EATOPEN, + EATOTHER, + ERUNNING, + EINVAL, + EEOF, + } ERRNUM; #endif /* ERRNUM_H */ diff --git a/include/z180-serv.h b/include/z180-serv.h index 3b4a462..760fa04 100644 --- a/include/z180-serv.h +++ b/include/z180-serv.h @@ -38,18 +38,6 @@ struct cpm_drive_s { 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); |