Add get_pin to bounce object #79

Open
kingjin94 wants to merge 1 commits from kingjin94/patch-1 into master
kingjin94 commented 2021-03-30 15:42:16 +03:00 (Migrated from github.com)

Make pin that Bounce is attached to publicly accessible

Make pin that Bounce is attached to publicly accessible
thomasfredericks commented 2021-03-31 18:51:19 +03:00 (Migrated from github.com)

Hi, why do you need to retrieve the pin number?

Hi, why do you need to retrieve the pin number?
matkor commented 2021-05-16 17:07:53 +03:00 (Migrated from github.com)

I need it too.
Saves 1B of RAM when you have to access pin number after Bounce is initialized.
I have to use :

class BounceExt: public Bounce
{
  public:
    uint8_t get_pin() {
      return pin;
    }
};

right now.

I need it too. Saves 1B of RAM when you have to access pin number after Bounce is initialized. I have to use : ``` class BounceExt: public Bounce { public: uint8_t get_pin() { return pin; } }; ``` right now.
This pull request has changes conflicting with the target branch.
  • src/Bounce2.h
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin kingjin94/patch-1:kingjin94/patch-1
git checkout kingjin94/patch-1
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Max/thomasfredericks_Bounce2#79