/*****************************************************************************

    source::worx libPiGPio
    Copyright © 2022 c.holzheuer
    chris@sourceworx.org

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Uses:

    pigpiod_if2 by joan2937, pigpio @ abyz.me.uk
    https://abyz.me.uk/rpi/pigpio

    sigslot  by 2017 Pierre-Antoine Lacaze
    https://github.com/palacaze/sigslot

***************************************************************************/


#ifndef PIGBUTTON_H
#define PIGBUTTON_H

#include <pignodein.h>

class LIBPIGPIO_EXPORT pigButton : public pigNodeIn
{


public:

    pigButton();
    pigButton( pigpio::bcm_t bcmNo );
    virtual ~pigButton();

    void init( pigpio::bcm_t bcmNo );

    void change_state( bool newState ) override;

protected:

    virtual void trigger( pigpio::bcm_t bcm, uint32_t level ) override;



};


#endif // PIGBUTTON_H



