From db746a3a55709a20183ecc33a1b6a5b40d863702 Mon Sep 17 00:00:00 2001 From: germeier Date: Fri, 20 Sep 2002 20:49:36 +0000 Subject: small fixes to mpiosh/callback.c added code to identify DMG+ (assumed, but should be correct) --- libmpio/defs.h | 11 ++++++----- libmpio/io.c | 3 ++- libmpio/mpio.c | 5 ++++- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'libmpio') diff --git a/libmpio/defs.h b/libmpio/defs.h index 70f789f..910df64 100644 --- a/libmpio/defs.h +++ b/libmpio/defs.h @@ -1,7 +1,7 @@ /* -*- linux-c -*- */ /* - * $Id: defs.h,v 1.7 2002/09/19 20:46:02 crunchy Exp $ + * $Id: defs.h,v 1.8 2002/09/20 20:49:36 germeier Exp $ * * Library for USB MPIO-* * @@ -41,10 +41,11 @@ typedef enum { MPIO_INTERNAL_MEM = 0x01, /* model type */ typedef enum { MPIO_MODEL_DME = 0x00, MPIO_MODEL_DMG = 0x01, - MPIO_MODEL_DMB = 0x02, - MPIO_MODEL_DMB_PLUS = 0x03, - MPIO_MODEL_DMK = 0x04, - MPIO_MODEL_UNKNOWN = 0x05 } mpio_model_t; + MPIO_MODEL_DMG_PLUS = 0x02, + MPIO_MODEL_DMB = 0x03, + MPIO_MODEL_DMB_PLUS = 0x04, + MPIO_MODEL_DMK = 0x05, + MPIO_MODEL_UNKNOWN = 0x06 } mpio_model_t; /* USB commands */ typedef enum { GET_VERSION = 0x01, diff --git a/libmpio/io.c b/libmpio/io.c index ca2c033..ad5df53 100644 --- a/libmpio/io.c +++ b/libmpio/io.c @@ -2,7 +2,7 @@ /* * - * $Id: io.c,v 1.14 2002/09/18 22:18:29 germeier Exp $ + * $Id: io.c,v 1.15 2002/09/20 20:49:36 germeier Exp $ * * Library for USB MPIO-* * @@ -58,6 +58,7 @@ model2externalmem(mpio_model_t model) switch(model) { case MPIO_MODEL_DMG: + case MPIO_MODEL_DMG_PLUS: m = 0x80; break; default: diff --git a/libmpio/mpio.c b/libmpio/mpio.c index f9da4b8..fdfba8b 100644 --- a/libmpio/mpio.c +++ b/libmpio/mpio.c @@ -1,6 +1,6 @@ /* * - * $Id: mpio.c,v 1.23 2002/09/19 22:23:01 crunchy Exp $ + * $Id: mpio.c,v 1.24 2002/09/20 20:49:36 germeier Exp $ * * Library for USB MPIO-* * @@ -46,6 +46,7 @@ static BYTE *mpio_model_name[] = { "MPIO-DME", "MPIO-DMG", + "MPIO-DMG+", "MPIO-DMB", "MPIO-DMB+", "MPIO-DMK", @@ -219,6 +220,8 @@ mpio_init(BYTE (*progress_callback)(int, int)) break ; case 'G': new_mpio->model = MPIO_MODEL_DMG; + if (new_mpio->version[6] == 'P') + new_mpio->model = MPIO_MODEL_DMG_PLUS; /* should be right */ break ; case 'B': new_mpio->model = MPIO_MODEL_DMB; -- cgit v1.2.3