{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/Arduino/issues/4519","repository_url":"https://api.github.com/repos/arduino/Arduino","labels_url":"https://api.github.com/repos/arduino/Arduino/issues/4519/labels{/name}","comments_url":"https://api.github.com/repos/arduino/Arduino/issues/4519/comments","events_url":"https://api.github.com/repos/arduino/Arduino/issues/4519/events","html_url":"https://github.com/arduino/Arduino/pull/4519","id":130898124,"number":4519,"title":"Support extra parameter on `attachInterrupt()`","user":{"login":"paulo-raca","id":1072660,"avatar_url":"https://avatars0.githubusercontent.com/u/1072660?v=4","gravatar_id":"","url":"https://api.github.com/users/paulo-raca","html_url":"https://github.com/paulo-raca","followers_url":"https://api.github.com/users/paulo-raca/followers","following_url":"https://api.github.com/users/paulo-raca/following{/other_user}","gists_url":"https://api.github.com/users/paulo-raca/gists{/gist_id}","starred_url":"https://api.github.com/users/paulo-raca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulo-raca/subscriptions","organizations_url":"https://api.github.com/users/paulo-raca/orgs","repos_url":"https://api.github.com/users/paulo-raca/repos","events_url":"https://api.github.com/users/paulo-raca/events{/privacy}","received_events_url":"https://api.github.com/users/paulo-raca/received_events","type":"User","site_admin":false},"labels":[{"id":197265361,"url":"https://api.github.com/repos/arduino/Arduino/labels/Architecture:%20AVR","name":"Architecture: AVR","color":"fbca04","default":false},{"id":20979470,"url":"https://api.github.com/repos/arduino/Arduino/labels/Component:%20Core","name":"Component: Core","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":41,"created_at":"2016-02-03T03:12:37Z","updated_at":"2017-09-01T17:02:28Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/arduino/Arduino/pulls/4519","html_url":"https://github.com/arduino/Arduino/pull/4519","diff_url":"https://github.com/arduino/Arduino/pull/4519.diff","patch_url":"https://github.com/arduino/Arduino/pull/4519.patch"},"body":"When writing an arduino library, it is difficult to connect interrupt handlers with the component instance that should be notified.\n\nIn C, the common pattern to fix this is to specifying a `void*` parameter with the callback, where the listener can store any context necessary.\n\nThis patch adds the new function `attachInterruptParam()` to implement this pattern.\n"},"comment":{"url":"https://api.github.com/repos/arduino/Arduino/issues/comments/326633245","html_url":"https://github.com/arduino/Arduino/pull/4519#issuecomment-326633245","issue_url":"https://api.github.com/repos/arduino/Arduino/issues/4519","id":326633245,"user":{"login":"cmaglie","id":423515,"avatar_url":"https://avatars2.githubusercontent.com/u/423515?v=4","gravatar_id":"","url":"https://api.github.com/users/cmaglie","html_url":"https://github.com/cmaglie","followers_url":"https://api.github.com/users/cmaglie/followers","following_url":"https://api.github.com/users/cmaglie/following{/other_user}","gists_url":"https://api.github.com/users/cmaglie/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaglie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaglie/subscriptions","organizations_url":"https://api.github.com/users/cmaglie/orgs","repos_url":"https://api.github.com/users/cmaglie/repos","events_url":"https://api.github.com/users/cmaglie/events{/privacy}","received_events_url":"https://api.github.com/users/cmaglie/received_events","type":"User","site_admin":false},"created_at":"2017-09-01T17:02:28Z","updated_at":"2017-09-01T17:02:28Z","author_association":"OWNER","body":"> I haven't tried, but I believe it does.\r\n\r\nOk, may you explain why calling a function with extra parameters is safe in the AVR case?\r\nI'd like to have some clarification I'm not so easy to merge something that really looks like something you should not do :-)\r\n\r\n> Also, even if ARM needs a bit more instructions, that's probably less of a problem given the usually faster MCUs.\r\n\r\nThe point is how much is this \"bit more\" on the ARM side, so I'm going to give it a try to check it out.\r\n"}}
{"actor":{"display_login":"cmaglie"}}