{"action":"created","comment":{"url":"https://api.github.com/repos/betaflight/betaflight/pulls/comments/120689173","pull_request_review_id":42673263,"id":120689173,"diff_hunk":"@@ -20,111 +20,114 @@\n \n #include <platform.h>\n \n-#include \"drivers/bus_i2c.h\"\n #include \"drivers/io.h\"\n+#include \"drivers/io_impl.h\"\n #include \"drivers/nvic.h\"\n #include \"drivers/time.h\"\n+#include \"drivers/rcc.h\"\n \n-#include \"io_impl.h\"\n-#include \"rcc.h\"\n-\n+#include \"drivers/bus_i2c.h\"\n+#include \"drivers/bus_i2c_impl.h\"\n \n-#if !defined(SOFT_I2C) && defined(USE_I2C)\n+#if defined(USE_I2C) && !defined(SOFT_I2C)\n \n #define CLOCKSPEED 800000    // i2c clockspeed 400kHz default (conform specs), 800kHz  and  1200kHz (Betaflight default)\n \n static void i2cUnstick(IO_t scl, IO_t sda);\n \n-#if defined(USE_I2C_PULLUP)\n-#define IOCFG_I2C IO_CONFIG(GPIO_MODE_AF_OD, GPIO_SPEED_FREQ_VERY_HIGH, GPIO_PULLUP)\n-#else\n-#define IOCFG_I2C IOCFG_AF_OD\n-#endif\n-\n-#ifndef I2C1_SCL\n-#define I2C1_SCL PB6\n-#endif\n-\n-#ifndef I2C1_SDA\n-#define I2C1_SDA PB7\n-#endif\n-\n-#ifndef I2C2_SCL\n-#define I2C2_SCL PB10\n-#endif\n-#ifndef I2C2_SDA\n-#define I2C2_SDA PB11\n+#define IOCFG_I2C_PU IO_CONFIG(GPIO_MODE_AF_OD, GPIO_SPEED_FREQ_VERY_HIGH, GPIO_PULLUP)\n+#define IOCFG_I2C_NOPU IOCFG_AF_OD","path":"src/main/drivers/bus_i2c_hal.c","position":44,"original_position":44,"commit_id":"299c95e3240a7dd6d76d680091891fd7cd3f519f","original_commit_id":"299c95e3240a7dd6d76d680091891fd7cd3f519f","user":{"login":"jflyper","id":14850998,"avatar_url":"https://avatars3.githubusercontent.com/u/14850998?v=3","gravatar_id":"","url":"https://api.github.com/users/jflyper","html_url":"https://github.com/jflyper","followers_url":"https://api.github.com/users/jflyper/followers","following_url":"https://api.github.com/users/jflyper/following{/other_user}","gists_url":"https://api.github.com/users/jflyper/gists{/gist_id}","starred_url":"https://api.github.com/users/jflyper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jflyper/subscriptions","organizations_url":"https://api.github.com/users/jflyper/orgs","repos_url":"https://api.github.com/users/jflyper/repos","events_url":"https://api.github.com/users/jflyper/events{/privacy}","received_events_url":"https://api.github.com/users/jflyper/received_events","type":"User","site_admin":false},"body":"Ack. Will do it for all (hal, F1&4 and F3).","created_at":"2017-06-07T17:15:31Z","updated_at":"2017-06-07T17:15:31Z","html_url":"https://github.com/betaflight/betaflight/pull/3229#discussion_r120689173","pull_request_url":"https://api.github.com/repos/betaflight/betaflight/pulls/3229","_links":{"self":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/comments/120689173"},"html":{"href":"https://github.com/betaflight/betaflight/pull/3229#discussion_r120689173"},"pull_request":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/3229"}}},"pull_request":{"url":"https://api.github.com/repos/betaflight/betaflight/pulls/3229","id":124354562,"html_url":"https://github.com/betaflight/betaflight/pull/3229","diff_url":"https://github.com/betaflight/betaflight/pull/3229.diff","patch_url":"https://github.com/betaflight/betaflight/pull/3229.patch","issue_url":"https://api.github.com/repos/betaflight/betaflight/issues/3229","number":3229,"state":"open","locked":false,"title":"Configurable I2C (rework)","user":{"login":"jflyper","id":14850998,"avatar_url":"https://avatars3.githubusercontent.com/u/14850998?v=3","gravatar_id":"","url":"https://api.github.com/users/jflyper","html_url":"https://github.com/jflyper","followers_url":"https://api.github.com/users/jflyper/followers","following_url":"https://api.github.com/users/jflyper/following{/other_user}","gists_url":"https://api.github.com/users/jflyper/gists{/gist_id}","starred_url":"https://api.github.com/users/jflyper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jflyper/subscriptions","organizations_url":"https://api.github.com/users/jflyper/orgs","repos_url":"https://api.github.com/users/jflyper/repos","events_url":"https://api.github.com/users/jflyper/events{/privacy}","received_events_url":"https://api.github.com/users/jflyper/received_events","type":"User","site_admin":false},"body":"PR status: Need review and feedback\r\n\r\nThis is a rework of the (fully) configurable I2C subsystem (#1867).","created_at":"2017-06-07T07:39:59Z","updated_at":"2017-06-07T17:15:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"963ee68ba4c8e1a1d6544ed560c85633bd36d3ac","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/betaflight/betaflight/pulls/3229/commits","review_comments_url":"https://api.github.com/repos/betaflight/betaflight/pulls/3229/comments","review_comment_url":"https://api.github.com/repos/betaflight/betaflight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/betaflight/betaflight/issues/3229/comments","statuses_url":"https://api.github.com/repos/betaflight/betaflight/statuses/299c95e3240a7dd6d76d680091891fd7cd3f519f","head":{"label":"jflyper:bfdev-i2c-configurable-rework","ref":"bfdev-i2c-configurable-rework","sha":"299c95e3240a7dd6d76d680091891fd7cd3f519f","user":{"login":"jflyper","id":14850998,"avatar_url":"https://avatars3.githubusercontent.com/u/14850998?v=3","gravatar_id":"","url":"https://api.github.com/users/jflyper","html_url":"https://github.com/jflyper","followers_url":"https://api.github.com/users/jflyper/followers","following_url":"https://api.github.com/users/jflyper/following{/other_user}","gists_url":"https://api.github.com/users/jflyper/gists{/gist_id}","starred_url":"https://api.github.com/users/jflyper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jflyper/subscriptions","organizations_url":"https://api.github.com/users/jflyper/orgs","repos_url":"https://api.github.com/users/jflyper/repos","events_url":"https://api.github.com/users/jflyper/events{/privacy}","received_events_url":"https://api.github.com/users/jflyper/received_events","type":"User","site_admin":false},"repo":{"id":52951844,"name":"cleanflight","full_name":"jflyper/cleanflight","owner":{"login":"jflyper","id":14850998,"avatar_url":"https://avatars3.githubusercontent.com/u/14850998?v=3","gravatar_id":"","url":"https://api.github.com/users/jflyper","html_url":"https://github.com/jflyper","followers_url":"https://api.github.com/users/jflyper/followers","following_url":"https://api.github.com/users/jflyper/following{/other_user}","gists_url":"https://api.github.com/users/jflyper/gists{/gist_id}","starred_url":"https://api.github.com/users/jflyper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jflyper/subscriptions","organizations_url":"https://api.github.com/users/jflyper/orgs","repos_url":"https://api.github.com/users/jflyper/repos","events_url":"https://api.github.com/users/jflyper/events{/privacy}","received_events_url":"https://api.github.com/users/jflyper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jflyper/cleanflight","description":"Clean-code version of the baseflight flight controller firmware","fork":true,"url":"https://api.github.com/repos/jflyper/cleanflight","forks_url":"https://api.github.com/repos/jflyper/cleanflight/forks","keys_url":"https://api.github.com/repos/jflyper/cleanflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jflyper/cleanflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jflyper/cleanflight/teams","hooks_url":"https://api.github.com/repos/jflyper/cleanflight/hooks","issue_events_url":"https://api.github.com/repos/jflyper/cleanflight/issues/events{/number}","events_url":"https://api.github.com/repos/jflyper/cleanflight/events","assignees_url":"https://api.github.com/repos/jflyper/cleanflight/assignees{/user}","branches_url":"https://api.github.com/repos/jflyper/cleanflight/branches{/branch}","tags_url":"https://api.github.com/repos/jflyper/cleanflight/tags","blobs_url":"https://api.github.com/repos/jflyper/cleanflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jflyper/cleanflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jflyper/cleanflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/jflyper/cleanflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jflyper/cleanflight/statuses/{sha}","languages_url":"https://api.github.com/repos/jflyper/cleanflight/languages","stargazers_url":"https://api.github.com/repos/jflyper/cleanflight/stargazers","contributors_url":"https://api.github.com/repos/jflyper/cleanflight/contributors","subscribers_url":"https://api.github.com/repos/jflyper/cleanflight/subscribers","subscription_url":"https://api.github.com/repos/jflyper/cleanflight/subscription","commits_url":"https://api.github.com/repos/jflyper/cleanflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/jflyper/cleanflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/jflyper/cleanflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/jflyper/cleanflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/jflyper/cleanflight/contents/{+path}","compare_url":"https://api.github.com/repos/jflyper/cleanflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jflyper/cleanflight/merges","archive_url":"https://api.github.com/repos/jflyper/cleanflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jflyper/cleanflight/downloads","issues_url":"https://api.github.com/repos/jflyper/cleanflight/issues{/number}","pulls_url":"https://api.github.com/repos/jflyper/cleanflight/pulls{/number}","milestones_url":"https://api.github.com/repos/jflyper/cleanflight/milestones{/number}","notifications_url":"https://api.github.com/repos/jflyper/cleanflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jflyper/cleanflight/labels{/name}","releases_url":"https://api.github.com/repos/jflyper/cleanflight/releases{/id}","deployments_url":"https://api.github.com/repos/jflyper/cleanflight/deployments","created_at":"2016-03-02T09:47:22Z","updated_at":"2016-04-10T02:03:59Z","pushed_at":"2017-06-07T12:35:43Z","git_url":"git://github.com/jflyper/cleanflight.git","ssh_url":"git@github.com:jflyper/cleanflight.git","clone_url":"https://github.com/jflyper/cleanflight.git","svn_url":"https://github.com/jflyper/cleanflight","homepage":"http://cleanflight.com","size":143164,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"betaflight:master","ref":"master","sha":"d68a72da9234bf13e5c06401c2a8a6e79cb1b529","user":{"login":"betaflight","id":19597933,"avatar_url":"https://avatars2.githubusercontent.com/u/19597933?v=3","gravatar_id":"","url":"https://api.github.com/users/betaflight","html_url":"https://github.com/betaflight","followers_url":"https://api.github.com/users/betaflight/followers","following_url":"https://api.github.com/users/betaflight/following{/other_user}","gists_url":"https://api.github.com/users/betaflight/gists{/gist_id}","starred_url":"https://api.github.com/users/betaflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betaflight/subscriptions","organizations_url":"https://api.github.com/users/betaflight/orgs","repos_url":"https://api.github.com/users/betaflight/repos","events_url":"https://api.github.com/users/betaflight/events{/privacy}","received_events_url":"https://api.github.com/users/betaflight/received_events","type":"Organization","site_admin":false},"repo":{"id":37060852,"name":"betaflight","full_name":"betaflight/betaflight","owner":{"login":"betaflight","id":19597933,"avatar_url":"https://avatars2.githubusercontent.com/u/19597933?v=3","gravatar_id":"","url":"https://api.github.com/users/betaflight","html_url":"https://github.com/betaflight","followers_url":"https://api.github.com/users/betaflight/followers","following_url":"https://api.github.com/users/betaflight/following{/other_user}","gists_url":"https://api.github.com/users/betaflight/gists{/gist_id}","starred_url":"https://api.github.com/users/betaflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betaflight/subscriptions","organizations_url":"https://api.github.com/users/betaflight/orgs","repos_url":"https://api.github.com/users/betaflight/repos","events_url":"https://api.github.com/users/betaflight/events{/privacy}","received_events_url":"https://api.github.com/users/betaflight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/betaflight/betaflight","description":null,"fork":true,"url":"https://api.github.com/repos/betaflight/betaflight","forks_url":"https://api.github.com/repos/betaflight/betaflight/forks","keys_url":"https://api.github.com/repos/betaflight/betaflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/betaflight/betaflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/betaflight/betaflight/teams","hooks_url":"https://api.github.com/repos/betaflight/betaflight/hooks","issue_events_url":"https://api.github.com/repos/betaflight/betaflight/issues/events{/number}","events_url":"https://api.github.com/repos/betaflight/betaflight/events","assignees_url":"https://api.github.com/repos/betaflight/betaflight/assignees{/user}","branches_url":"https://api.github.com/repos/betaflight/betaflight/branches{/branch}","tags_url":"https://api.github.com/repos/betaflight/betaflight/tags","blobs_url":"https://api.github.com/repos/betaflight/betaflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/betaflight/betaflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/betaflight/betaflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/betaflight/betaflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/betaflight/betaflight/statuses/{sha}","languages_url":"https://api.github.com/repos/betaflight/betaflight/languages","stargazers_url":"https://api.github.com/repos/betaflight/betaflight/stargazers","contributors_url":"https://api.github.com/repos/betaflight/betaflight/contributors","subscribers_url":"https://api.github.com/repos/betaflight/betaflight/subscribers","subscription_url":"https://api.github.com/repos/betaflight/betaflight/subscription","commits_url":"https://api.github.com/repos/betaflight/betaflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/betaflight/betaflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/betaflight/betaflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/betaflight/betaflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/betaflight/betaflight/contents/{+path}","compare_url":"https://api.github.com/repos/betaflight/betaflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/betaflight/betaflight/merges","archive_url":"https://api.github.com/repos/betaflight/betaflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/betaflight/betaflight/downloads","issues_url":"https://api.github.com/repos/betaflight/betaflight/issues{/number}","pulls_url":"https://api.github.com/repos/betaflight/betaflight/pulls{/number}","milestones_url":"https://api.github.com/repos/betaflight/betaflight/milestones{/number}","notifications_url":"https://api.github.com/repos/betaflight/betaflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/betaflight/betaflight/labels{/name}","releases_url":"https://api.github.com/repos/betaflight/betaflight/releases{/id}","deployments_url":"https://api.github.com/repos/betaflight/betaflight/deployments","created_at":"2015-06-08T10:37:44Z","updated_at":"2017-06-07T06:29:52Z","pushed_at":"2017-06-07T12:36:27Z","git_url":"git://github.com/betaflight/betaflight.git","ssh_url":"git@github.com:betaflight/betaflight.git","clone_url":"https://github.com/betaflight/betaflight.git","svn_url":"https://github.com/betaflight/betaflight","homepage":"","size":132629,"stargazers_count":1034,"watchers_count":1034,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":454,"mirror_url":null,"open_issues_count":299,"forks":454,"open_issues":299,"watchers":1034,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/3229"},"html":{"href":"https://github.com/betaflight/betaflight/pull/3229"},"issue":{"href":"https://api.github.com/repos/betaflight/betaflight/issues/3229"},"comments":{"href":"https://api.github.com/repos/betaflight/betaflight/issues/3229/comments"},"review_comments":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/3229/comments"},"review_comment":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/3229/commits"},"statuses":{"href":"https://api.github.com/repos/betaflight/betaflight/statuses/299c95e3240a7dd6d76d680091891fd7cd3f519f"}}}}
{"actor":{"display_login":"jflyper"}}