Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

functional callbacks #11497

Closed
Closed
Assignees
Labels
Milestone
@jonnytest1

Description

Related area

Wire

Hardware specification

Is your feature request related to a problem?

class MyClass:
{
 void setup()
 {
 i2cinput.onRequest([this]() {
 // dothings
 });
 }
};

void (*user_onRequest)(void);
void (*user_onReceive)(int);

void onReceive(void ()(int)) override;
void onRequest(void (
)(void)) override;

Describe the solution you'd like

this instead 🤔
std::function<void()> user_onRequest;
std::function<void(int)> user_onReceive;
void onReceive(std::function<void(int)> function);
void onRequest(std::function<void()> function);

Describe alternatives you've considered

manually changing the lib locally

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions

    AltStyle によって変換されたページ (->オリジナル) /