Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
/*****************************************************************************
GateInJackDetection.hpp
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
#pragma once
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
namespace erb
{
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : ctor
==============================================================================
*/
GateInJackDetection::GateInJackDetection (const uint8_t & data, const uint8_t & npr)
: impl_data (data)
, impl_npr (npr)
{
}
/*
==============================================================================
Name : plugged
==============================================================================
*/
bool GateInJackDetection::plugged () const
{
return _jack_detection.plugged ();
}
/*
==============================================================================
Name : triggered
==============================================================================
*/
bool GateInJackDetection::triggered () const
{
return _current && !_previous;
}
/*
==============================================================================
Name : operator bool
==============================================================================
*/
GateInJackDetection::operator bool () const
{
return _current;
}
/*\\\ INTERNAL \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : impl_preprocess
==============================================================================
*/
void GateInJackDetection::impl_preprocess ()
{
_previous = _current;
_current = impl_data != 0;
_jack_detection.push (impl_data != 0, impl_npr != 0);
}
/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
} // namespace erb
/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
20e06d02cThis file is pinned to the selected release. Download the original to open it in your design tool.