Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
/*****************************************************************************
Button.cpp
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
#include "erb/Button.h"
namespace erb
{
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : idle
==============================================================================
*/
bool Button::idle () const
{
return _debounce.idle ();
}
/*
==============================================================================
Name : pressed
==============================================================================
*/
bool Button::pressed () const
{
return _debounce.pressed ();
}
/*
==============================================================================
Name : held
==============================================================================
*/
bool Button::held () const
{
return _debounce.held ();
}
/*
==============================================================================
Name : released
==============================================================================
*/
bool Button::released () const
{
return _debounce.released ();
}
/*\\\ INTERNAL \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : impl_bind_data
==============================================================================
*/
void Button::impl_bind_data (const uint8_t & val)
{
_val_ptr = &val;
}
/*
==============================================================================
Name : impl_notify_audio_buffer_start
==============================================================================
*/
void Button::impl_notify_audio_buffer_start ()
{
_debounce.process (*_val_ptr != 0);
}
/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
} // namespace erb
/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
8b8937c75This file is pinned to the selected release. Download the original to open it in your design tool.