{"action":"created","comment":{"url":"https://api.github.com/repos/tessel/rfid-pn532/pulls/comments/45664820","id":45664820,"diff_hunk":"@@ -710,7 +686,7 @@ RFID.prototype.stopListening = function (callback) {\n };\n \n RFID.prototype.disable = function () {\n-  this.irq.removeListener('fall', this.irqcallback);\n+  this.irq.removeAllListeners();","path":"index.js","position":384,"original_position":384,"commit_id":"3128283d3b0a1b6948e02a0d30e93a9f260b6966","original_commit_id":"3128283d3b0a1b6948e02a0d30e93a9f260b6966","user":{"login":"johnnyman727","id":432909,"avatar_url":"https://avatars.githubusercontent.com/u/432909?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnyman727","html_url":"https://github.com/johnnyman727","followers_url":"https://api.github.com/users/johnnyman727/followers","following_url":"https://api.github.com/users/johnnyman727/following{/other_user}","gists_url":"https://api.github.com/users/johnnyman727/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyman727/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyman727/subscriptions","organizations_url":"https://api.github.com/users/johnnyman727/orgs","repos_url":"https://api.github.com/users/johnnyman727/repos","events_url":"https://api.github.com/users/johnnyman727/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyman727/received_events","type":"User","site_admin":false},"body":"We don't use the `fall` IRQ anymore so just remove any remaining listeners (should be all `low`).","created_at":"2015-11-23T21:41:05Z","updated_at":"2015-11-23T21:41:05Z","html_url":"https://github.com/tessel/rfid-pn532/pull/26#discussion_r45664820","pull_request_url":"https://api.github.com/repos/tessel/rfid-pn532/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/tessel/rfid-pn532/pulls/comments/45664820"},"html":{"href":"https://github.com/tessel/rfid-pn532/pull/26#discussion_r45664820"},"pull_request":{"href":"https://api.github.com/repos/tessel/rfid-pn532/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/tessel/rfid-pn532/pulls/26","id":51583695,"html_url":"https://github.com/tessel/rfid-pn532/pull/26","diff_url":"https://github.com/tessel/rfid-pn532/pull/26.diff","patch_url":"https://github.com/tessel/rfid-pn532/pull/26.patch","issue_url":"https://api.github.com/repos/tessel/rfid-pn532/issues/26","number":26,"state":"open","locked":false,"title":"Use pin callbacks and IRQs","user":{"login":"johnnyman727","id":432909,"avatar_url":"https://avatars.githubusercontent.com/u/432909?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnyman727","html_url":"https://github.com/johnnyman727","followers_url":"https://api.github.com/users/johnnyman727/followers","following_url":"https://api.github.com/users/johnnyman727/following{/other_user}","gists_url":"https://api.github.com/users/johnnyman727/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyman727/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyman727/subscriptions","organizations_url":"https://api.github.com/users/johnnyman727/orgs","repos_url":"https://api.github.com/users/johnnyman727/repos","events_url":"https://api.github.com/users/johnnyman727/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyman727/received_events","type":"User","site_admin":false},"body":"This PR looks bigger than it actually is but I made two changes to fix the driver for Tessel 2:\r\n\r\n* Made `pin.write` calls provide a callback rather than assuming they work synchronously. On Tessel 2, no calls are synchronous.\r\n* Instead of iterating every 50 seconds to check an IRQ line, I used the built-in hardware interrupts (`self.irq.once('low', function ready() {...}`). This was mostly for code cleanup rather than compatibility but it made the code much easier to get working for T2.","created_at":"2015-11-23T21:35:39Z","updated_at":"2015-11-23T21:41:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c3c9bb3f886607754d8fa8562ed62a0c56e1611","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tessel/rfid-pn532/pulls/26/commits","review_comments_url":"https://api.github.com/repos/tessel/rfid-pn532/pulls/26/comments","review_comment_url":"https://api.github.com/repos/tessel/rfid-pn532/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tessel/rfid-pn532/issues/26/comments","statuses_url":"https://api.github.com/repos/tessel/rfid-pn532/statuses/3128283d3b0a1b6948e02a0d30e93a9f260b6966","head":{"label":"tessel:jon-t2-compat","ref":"jon-t2-compat","sha":"3128283d3b0a1b6948e02a0d30e93a9f260b6966","user":{"login":"tessel","id":5573563,"avatar_url":"https://avatars.githubusercontent.com/u/5573563?v=3","gravatar_id":"","url":"https://api.github.com/users/tessel","html_url":"https://github.com/tessel","followers_url":"https://api.github.com/users/tessel/followers","following_url":"https://api.github.com/users/tessel/following{/other_user}","gists_url":"https://api.github.com/users/tessel/gists{/gist_id}","starred_url":"https://api.github.com/users/tessel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessel/subscriptions","organizations_url":"https://api.github.com/users/tessel/orgs","repos_url":"https://api.github.com/users/tessel/repos","events_url":"https://api.github.com/users/tessel/events{/privacy}","received_events_url":"https://api.github.com/users/tessel/received_events","type":"Organization","site_admin":false},"repo":{"id":20119966,"name":"rfid-pn532","full_name":"tessel/rfid-pn532","owner":{"login":"tessel","id":5573563,"avatar_url":"https://avatars.githubusercontent.com/u/5573563?v=3","gravatar_id":"","url":"https://api.github.com/users/tessel","html_url":"https://github.com/tessel","followers_url":"https://api.github.com/users/tessel/followers","following_url":"https://api.github.com/users/tessel/following{/other_user}","gists_url":"https://api.github.com/users/tessel/gists{/gist_id}","starred_url":"https://api.github.com/users/tessel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessel/subscriptions","organizations_url":"https://api.github.com/users/tessel/orgs","repos_url":"https://api.github.com/users/tessel/repos","events_url":"https://api.github.com/users/tessel/events{/privacy}","received_events_url":"https://api.github.com/users/tessel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tessel/rfid-pn532","description":"JavaScript module for the PN532 driver for RFID.","fork":false,"url":"https://api.github.com/repos/tessel/rfid-pn532","forks_url":"https://api.github.com/repos/tessel/rfid-pn532/forks","keys_url":"https://api.github.com/repos/tessel/rfid-pn532/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tessel/rfid-pn532/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tessel/rfid-pn532/teams","hooks_url":"https://api.github.com/repos/tessel/rfid-pn532/hooks","issue_events_url":"https://api.github.com/repos/tessel/rfid-pn532/issues/events{/number}","events_url":"https://api.github.com/repos/tessel/rfid-pn532/events","assignees_url":"https://api.github.com/repos/tessel/rfid-pn532/assignees{/user}","branches_url":"https://api.github.com/repos/tessel/rfid-pn532/branches{/branch}","tags_url":"https://api.github.com/repos/tessel/rfid-pn532/tags","blobs_url":"https://api.github.com/repos/tessel/rfid-pn532/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tessel/rfid-pn532/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tessel/rfid-pn532/git/refs{/sha}","trees_url":"https://api.github.com/repos/tessel/rfid-pn532/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tessel/rfid-pn532/statuses/{sha}","languages_url":"https://api.github.com/repos/tessel/rfid-pn532/languages","stargazers_url":"https://api.github.com/repos/tessel/rfid-pn532/stargazers","contributors_url":"https://api.github.com/repos/tessel/rfid-pn532/contributors","subscribers_url":"https://api.github.com/repos/tessel/rfid-pn532/subscribers","subscription_url":"https://api.github.com/repos/tessel/rfid-pn532/subscription","commits_url":"https://api.github.com/repos/tessel/rfid-pn532/commits{/sha}","git_commits_url":"https://api.github.com/repos/tessel/rfid-pn532/git/commits{/sha}","comments_url":"https://api.github.com/repos/tessel/rfid-pn532/comments{/number}","issue_comment_url":"https://api.github.com/repos/tessel/rfid-pn532/issues/comments{/number}","contents_url":"https://api.github.com/repos/tessel/rfid-pn532/contents/{+path}","compare_url":"https://api.github.com/repos/tessel/rfid-pn532/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tessel/rfid-pn532/merges","archive_url":"https://api.github.com/repos/tessel/rfid-pn532/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tessel/rfid-pn532/downloads","issues_url":"https://api.github.com/repos/tessel/rfid-pn532/issues{/number}","pulls_url":"https://api.github.com/repos/tessel/rfid-pn532/pulls{/number}","milestones_url":"https://api.github.com/repos/tessel/rfid-pn532/milestones{/number}","notifications_url":"https://api.github.com/repos/tessel/rfid-pn532/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tessel/rfid-pn532/labels{/name}","releases_url":"https://api.github.com/repos/tessel/rfid-pn532/releases{/id}","created_at":"2014-05-24T02:18:27Z","updated_at":"2015-07-16T19:29:11Z","pushed_at":"2015-11-23T21:35:39Z","git_url":"git://github.com/tessel/rfid-pn532.git","ssh_url":"git@github.com:tessel/rfid-pn532.git","clone_url":"https://github.com/tessel/rfid-pn532.git","svn_url":"https://github.com/tessel/rfid-pn532","homepage":null,"size":149,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":11,"default_branch":"master"}},"base":{"label":"tessel:master","ref":"master","sha":"2461b4f59b11afcba7c76c9003c282d12a046f5c","user":{"login":"tessel","id":5573563,"avatar_url":"https://avatars.githubusercontent.com/u/5573563?v=3","gravatar_id":"","url":"https://api.github.com/users/tessel","html_url":"https://github.com/tessel","followers_url":"https://api.github.com/users/tessel/followers","following_url":"https://api.github.com/users/tessel/following{/other_user}","gists_url":"https://api.github.com/users/tessel/gists{/gist_id}","starred_url":"https://api.github.com/users/tessel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessel/subscriptions","organizations_url":"https://api.github.com/users/tessel/orgs","repos_url":"https://api.github.com/users/tessel/repos","events_url":"https://api.github.com/users/tessel/events{/privacy}","received_events_url":"https://api.github.com/users/tessel/received_events","type":"Organization","site_admin":false},"repo":{"id":20119966,"name":"rfid-pn532","full_name":"tessel/rfid-pn532","owner":{"login":"tessel","id":5573563,"avatar_url":"https://avatars.githubusercontent.com/u/5573563?v=3","gravatar_id":"","url":"https://api.github.com/users/tessel","html_url":"https://github.com/tessel","followers_url":"https://api.github.com/users/tessel/followers","following_url":"https://api.github.com/users/tessel/following{/other_user}","gists_url":"https://api.github.com/users/tessel/gists{/gist_id}","starred_url":"https://api.github.com/users/tessel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessel/subscriptions","organizations_url":"https://api.github.com/users/tessel/orgs","repos_url":"https://api.github.com/users/tessel/repos","events_url":"https://api.github.com/users/tessel/events{/privacy}","received_events_url":"https://api.github.com/users/tessel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tessel/rfid-pn532","description":"JavaScript module for the PN532 driver for RFID.","fork":false,"url":"https://api.github.com/repos/tessel/rfid-pn532","forks_url":"https://api.github.com/repos/tessel/rfid-pn532/forks","keys_url":"https://api.github.com/repos/tessel/rfid-pn532/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tessel/rfid-pn532/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tessel/rfid-pn532/teams","hooks_url":"https://api.github.com/repos/tessel/rfid-pn532/hooks","issue_events_url":"https://api.github.com/repos/tessel/rfid-pn532/issues/events{/number}","events_url":"https://api.github.com/repos/tessel/rfid-pn532/events","assignees_url":"https://api.github.com/repos/tessel/rfid-pn532/assignees{/user}","branches_url":"https://api.github.com/repos/tessel/rfid-pn532/branches{/branch}","tags_url":"https://api.github.com/repos/tessel/rfid-pn532/tags","blobs_url":"https://api.github.com/repos/tessel/rfid-pn532/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tessel/rfid-pn532/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tessel/rfid-pn532/git/refs{/sha}","trees_url":"https://api.github.com/repos/tessel/rfid-pn532/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tessel/rfid-pn532/statuses/{sha}","languages_url":"https://api.github.com/repos/tessel/rfid-pn532/languages","stargazers_url":"https://api.github.com/repos/tessel/rfid-pn532/stargazers","contributors_url":"https://api.github.com/repos/tessel/rfid-pn532/contributors","subscribers_url":"https://api.github.com/repos/tessel/rfid-pn532/subscribers","subscription_url":"https://api.github.com/repos/tessel/rfid-pn532/subscription","commits_url":"https://api.github.com/repos/tessel/rfid-pn532/commits{/sha}","git_commits_url":"https://api.github.com/repos/tessel/rfid-pn532/git/commits{/sha}","comments_url":"https://api.github.com/repos/tessel/rfid-pn532/comments{/number}","issue_comment_url":"https://api.github.com/repos/tessel/rfid-pn532/issues/comments{/number}","contents_url":"https://api.github.com/repos/tessel/rfid-pn532/contents/{+path}","compare_url":"https://api.github.com/repos/tessel/rfid-pn532/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tessel/rfid-pn532/merges","archive_url":"https://api.github.com/repos/tessel/rfid-pn532/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tessel/rfid-pn532/downloads","issues_url":"https://api.github.com/repos/tessel/rfid-pn532/issues{/number}","pulls_url":"https://api.github.com/repos/tessel/rfid-pn532/pulls{/number}","milestones_url":"https://api.github.com/repos/tessel/rfid-pn532/milestones{/number}","notifications_url":"https://api.github.com/repos/tessel/rfid-pn532/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tessel/rfid-pn532/labels{/name}","releases_url":"https://api.github.com/repos/tessel/rfid-pn532/releases{/id}","created_at":"2014-05-24T02:18:27Z","updated_at":"2015-07-16T19:29:11Z","pushed_at":"2015-11-23T21:35:39Z","git_url":"git://github.com/tessel/rfid-pn532.git","ssh_url":"git@github.com:tessel/rfid-pn532.git","clone_url":"https://github.com/tessel/rfid-pn532.git","svn_url":"https://github.com/tessel/rfid-pn532","homepage":null,"size":149,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tessel/rfid-pn532/pulls/26"},"html":{"href":"https://github.com/tessel/rfid-pn532/pull/26"},"issue":{"href":"https://api.github.com/repos/tessel/rfid-pn532/issues/26"},"comments":{"href":"https://api.github.com/repos/tessel/rfid-pn532/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/tessel/rfid-pn532/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/tessel/rfid-pn532/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tessel/rfid-pn532/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/tessel/rfid-pn532/statuses/3128283d3b0a1b6948e02a0d30e93a9f260b6966"}}}}