Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
/*****************************************************************************
EncoderButton.cpp
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
#include "erb/EncoderButton.h"
namespace erb
{
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : ctor
==============================================================================
*/
EncoderButton::EncoderButton (const uint8_t & data_0, const uint8_t & data_1, const uint8_t & data_2)
: encoder (data_0, data_1)
, button (data_2)
{
}
/*
==============================================================================
Name : operator int
==============================================================================
*/
EncoderButton::operator int () const
{
return int (encoder);
}
/*
==============================================================================
Name : idle
==============================================================================
*/
bool EncoderButton::idle () const
{
return button.idle ();
}
/*
==============================================================================
Name : pressed
==============================================================================
*/
bool EncoderButton::pressed () const
{
return button.pressed ();
}
/*
==============================================================================
Name : held
==============================================================================
*/
bool EncoderButton::held () const
{
return button.held ();
}
/*
==============================================================================
Name : released
==============================================================================
*/
bool EncoderButton::released () const
{
return button.released ();
}
/*\\\ INTERNAL \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : impl_preprocess
==============================================================================
*/
void EncoderButton::impl_preprocess ()
{
encoder.impl_preprocess ();
button.impl_preprocess ();
}
/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
} // namespace erb
/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
7b41c4c52This file is pinned to the selected release. Download the original to open it in your design tool.