aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-01-31 02:43:27 +0100
committerJavier <dev.git@javispedro.com>2022-01-31 02:43:27 +0100
commit2f1022df0395badf03fc7cb20c82ee770b5b2c1d (patch)
treebf255d6eaf29e6358dd1688ea26b693ec5b7a744
parent82ae0fe6ce8aaa95850ef5979fc11b4f527b18ce (diff)
downloadvmusic-2f1022df0395badf03fc7cb20c82ee770b5b2c1d.tar.gz
vmusic-2f1022df0395badf03fc7cb20c82ee770b5b2c1d.zip
make Mpu401 less noisy about incorrect data port accessv0.2
-rw-r--r--Mpu401.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Mpu401.cpp b/Mpu401.cpp
index 8e2badc..eaced84 100644
--- a/Mpu401.cpp
+++ b/Mpu401.cpp
@@ -153,7 +153,7 @@ static uint8_t mpuReadData(PPDMDEVINS pDevIns)
return pThis->uInput;
}
- if (pThis->fModeUart) {
+ if (pThis->fModeUart && pThis->midi.readAvail() >= 1) {
uint8_t data;
ssize_t read = pThis->midi.read(&data, 1);
if (read == 1) {
@@ -162,7 +162,7 @@ static uint8_t mpuReadData(PPDMDEVINS pDevIns)
}
}
- LogWarnFunc(("Trying to read, but no data to read\n"));
+ Log3Func(("Trying to read, but no data to read\n"));
return MPU_RESPONSE_ACK;
}
@@ -177,7 +177,7 @@ static void mpuWriteData(PPDMDEVINS pDevIns, uint8_t data)
Log5Func(("midi_out data=0x%x\n", data));
}
} else {
- LogWarnFunc(("Ignoring data, not in UART mode\n"));
+ Log3Func(("Ignoring data, not in UART mode\n"));
}
}