diff options
| author | 2023-05-23 07:41:27 +0200 | |
|---|---|---|
| committer | 2023-05-23 15:41:27 +1000 | |
| commit | c5a978bca7601f4dd2c4a0ebe397275021eb6cb1 (patch) | |
| tree | ca922a9e77517f13b0d68666ad23b43d0d95b6e9 /src/devices/machine/pckeybrd.cpp | |
| parent | aee8c4f3efe73dcf48438471be8c293192c7f73a (diff) | |
Cleaned up logging across the codebase (GitHub #10183). (#11250) [Ryan Holtz]
* Converted various logging patterns to use logmacro.h consistently.
* Removed redefinitions of LOG_GENERAL.
* Use LOGMASKED in more places.
Diffstat (limited to 'src/devices/machine/pckeybrd.cpp')
| -rw-r--r-- | src/devices/machine/pckeybrd.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index c2b46fbe4b7..966998eee1f 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -24,8 +24,10 @@ /* AT keyboard documentation comes from www.beyondlogic.org and HelpPC documentation */ -/* to enable logging of keyboard read/writes */ -#define LOG_KEYBOARD 0 +/* for logging of keyboard read/writes */ +#define LOG_KEYBOARD (1U << 1) +#define VERBOSE (0) +#include "logmacro.h" /* @@ -378,8 +380,7 @@ void pc_keyboard_device::enable(int state) /* insert a code into the buffer */ void pc_keyboard_device::queue_insert(uint8_t data) { - if (LOG_KEYBOARD) - logerror("keyboard queueing %.2x\n",data); + LOGMASKED(LOG_KEYBOARD, "keyboard queueing %.2x\n", data); m_queue[m_head] = data; m_head++; @@ -622,8 +623,7 @@ uint8_t pc_keyboard_device::read() data = m_queue[m_tail]; - if (LOG_KEYBOARD) - logerror("read(): Keyboard Read 0x%02x\n",data); + LOGMASKED(LOG_KEYBOARD, "read(): Keyboard Read 0x%02x\n", data); m_tail++; m_tail %= std::size(m_queue); @@ -690,8 +690,7 @@ SeeAlso: #P046 void at_keyboard_device::write(uint8_t data) { - if (LOG_KEYBOARD) - logerror("keyboard write %.2x\n",data); + LOGMASKED(LOG_KEYBOARD, "keyboard write %.2x\n", data); switch (m_input_state) { |
