Implemented peeking with and without data for interrupt and blocking mode
This commit is contained in:
@@ -73,6 +73,15 @@ class Hardware {
|
||||
*Registers::IO_REG = byte;
|
||||
}
|
||||
|
||||
static bool peekBlocking() FORCE_INLINE
|
||||
{
|
||||
if (*Registers::CTRL_STAT_REG_A & (1 << CtrlFlagsA::RECEIVE_COMPLETE)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void enableDataRegEmptyInt() FORCE_INLINE
|
||||
{
|
||||
*Registers::CTRL_STAT_REG_B |= (1 << CtrlFlagsB::DATA_REG_EMPTY_INT_ENABLE);
|
||||
|
||||
Reference in New Issue
Block a user