From 0507e8c0c4e9d01a74d62ea79c8f6e6ab6b2fe28 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 9 Feb 2014 09:59:00 +0800 Subject: [PATCH] UDI/PIO - Return buffer correctly, extra tracing --- KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c b/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c index f0428fc7..dc45d256 100644 --- a/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c +++ b/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c @@ -2,7 +2,7 @@ * \file udi_lib/physio/pio.c * \author John Hodge (thePowersGang) */ -#define DEBUG 1 +#define DEBUG 0 #include #include #include @@ -479,6 +479,7 @@ void udi_pio_trans(udi_pio_trans_call_t *callback, udi_cb_t *gcb, _operation_and(tran_size, reg, ®isters[operand]); break; case UDI_PIO_AND_IMM: + LOG("AND_IMM R%i &= 0x%x", reg_num, operand); tmpval.words[0] = operand; _zero_upper(UDI_PIO_2BYTE, &tmpval); _operation_and(tran_size, reg, &tmpval); @@ -487,6 +488,7 @@ void udi_pio_trans(udi_pio_trans_call_t *callback, udi_cb_t *gcb, _operation_or(tran_size, reg, ®isters[operand]); break; case UDI_PIO_OR_IMM: + LOG("OR_IMM R%i |= 0x%x", reg_num, operand); tmpval.words[0] = operand; _zero_upper(UDI_PIO_4BYTE, &tmpval); _operation_or(tran_size, reg, &tmpval); @@ -622,10 +624,10 @@ void udi_pio_trans(udi_pio_trans_call_t *callback, udi_cb_t *gcb, ops); } end: - callback(gcb, NULL, UDI_OK, ret_status); + callback(gcb, buf, UDI_OK, ret_status); return ; error: - callback(gcb, NULL, UDI_STAT_HW_PROBLEM, 0); + callback(gcb, buf, UDI_STAT_HW_PROBLEM, 0); } void udi_pio_probe(udi_pio_probe_call_t *callback, udi_cb_t *gcb, -- 2.20.1