{"action":"created","comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments/27250132","id":27250132,"diff_hunk":"@@ -17,20 +17,23 @@\n \n #pragma once\n \n-typedef enum {\n-    SERIAL_NOT_INVERTED = 0,\n-    SERIAL_INVERTED\n-} serialInversion_e;\n-\n typedef enum portMode_t {\n     MODE_RX = 1 << 0,\n     MODE_TX = 1 << 1,\n-    MODE_RXTX = MODE_RX | MODE_TX,\n-    MODE_SBUS = 1 << 2,\n-    MODE_BIDIR = 1 << 3,\n-    MODE_STOPBITS2 = 1 << 4,\n+    MODE_RXTX = MODE_RX | MODE_TX\n } portMode_t;\n \n+typedef enum portOptions_t {\n+    SERIAL_NOT_INVERTED  = 0 << 0,\n+    SERIAL_INVERTED      = 1 << 0,\n+    SERIAL_STOPBITS_1    = 0 << 1,\n+    SERIAL_STOPBITS_2    = 1 << 1,\n+    SERIAL_PARITY_NO     = 0 << 2,\n+    SERIAL_PARITY_EVEN   = 1 << 2,\n+    SERIAL_UNIDIR        = 0 << 3,","path":"src/main/drivers/serial.h","position":26,"original_position":26,"commit_id":"3c543d36c803c8d09e36d92b69933b74d3575e75","original_commit_id":"3c543d36c803c8d09e36d92b69933b74d3575e75","user":{"login":"ledvinap","id":2318015,"avatar_url":"https://avatars.githubusercontent.com/u/2318015?v=3","gravatar_id":"","url":"https://api.github.com/users/ledvinap","html_url":"https://github.com/ledvinap","followers_url":"https://api.github.com/users/ledvinap/followers","following_url":"https://api.github.com/users/ledvinap/following{/other_user}","gists_url":"https://api.github.com/users/ledvinap/gists{/gist_id}","starred_url":"https://api.github.com/users/ledvinap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ledvinap/subscriptions","organizations_url":"https://api.github.com/users/ledvinap/orgs","repos_url":"https://api.github.com/users/ledvinap/repos","events_url":"https://api.github.com/users/ledvinap/events{/privacy}","received_events_url":"https://api.github.com/users/ledvinap/received_events","type":"User","site_admin":false},"body":"Maybe TWOWIRE or DUPLEX ?","created_at":"2015-03-26T20:01:29Z","updated_at":"2015-03-26T20:01:29Z","html_url":"https://github.com/cleanflight/cleanflight/pull/628#discussion_r27250132","pull_request_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/628","_links":{"self":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments/27250132"},"html":{"href":"https://github.com/cleanflight/cleanflight/pull/628#discussion_r27250132"},"pull_request":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/628"}}},"pull_request":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/628","id":31195356,"html_url":"https://github.com/cleanflight/cleanflight/pull/628","diff_url":"https://github.com/cleanflight/cleanflight/pull/628.diff","patch_url":"https://github.com/cleanflight/cleanflight/pull/628.patch","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/628","number":628,"state":"closed","locked":false,"title":"Add new serial port options field (inversion, stop bits, etc)","user":{"login":"thenickdude","id":1921411,"avatar_url":"https://avatars.githubusercontent.com/u/1921411?v=3","gravatar_id":"","url":"https://api.github.com/users/thenickdude","html_url":"https://github.com/thenickdude","followers_url":"https://api.github.com/users/thenickdude/followers","following_url":"https://api.github.com/users/thenickdude/following{/other_user}","gists_url":"https://api.github.com/users/thenickdude/gists{/gist_id}","starred_url":"https://api.github.com/users/thenickdude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thenickdude/subscriptions","organizations_url":"https://api.github.com/users/thenickdude/orgs","repos_url":"https://api.github.com/users/thenickdude/repos","events_url":"https://api.github.com/users/thenickdude/events{/privacy}","received_events_url":"https://api.github.com/users/thenickdude/received_events","type":"User","site_admin":false},"body":"Whoops, accidentally added this branch to the Cleanflight repo rather than my own repo! Anyway, this separates out port options from the port \"mode\" field. Port options are inversion, stop bits and parity.\r\n\r\nTested:\r\n* FrSky telemetry on Softserial (softserial inversion)\r\n* Blackbox at 230400 on UART1 (2 stop bits option)\r\n* Blackbox at 250000 on UART1 (default options)\r\n* CLI, MSP etc on UART1 (default options)\r\n* SBus (2 stop bits, inversion, even parity). Hydra tested this on F3\r\n\r\nUntested:\r\n* Smartport (BIDIR option)","created_at":"2015-03-15T04:46:54Z","updated_at":"2015-03-26T20:01:29Z","closed_at":"2015-03-26T01:42:58Z","merged_at":"2015-03-26T01:42:58Z","merge_commit_sha":"727debf785dfc05f70137f0661c9328b58ae3c6a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/628/commits","review_comments_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/628/comments","review_comment_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/628/comments","statuses_url":"https://api.github.com/repos/cleanflight/cleanflight/statuses/3c543d36c803c8d09e36d92b69933b74d3575e75","head":{"label":"cleanflight:serial-port-options","ref":"serial-port-options","sha":"3c543d36c803c8d09e36d92b69933b74d3575e75","user":{"login":"cleanflight","id":8776523,"avatar_url":"https://avatars.githubusercontent.com/u/8776523?v=3","gravatar_id":"","url":"https://api.github.com/users/cleanflight","html_url":"https://github.com/cleanflight","followers_url":"https://api.github.com/users/cleanflight/followers","following_url":"https://api.github.com/users/cleanflight/following{/other_user}","gists_url":"https://api.github.com/users/cleanflight/gists{/gist_id}","starred_url":"https://api.github.com/users/cleanflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleanflight/subscriptions","organizations_url":"https://api.github.com/users/cleanflight/orgs","repos_url":"https://api.github.com/users/cleanflight/repos","events_url":"https://api.github.com/users/cleanflight/events{/privacy}","received_events_url":"https://api.github.com/users/cleanflight/received_events","type":"Organization","site_admin":false},"repo":{"id":9066347,"name":"cleanflight","full_name":"cleanflight/cleanflight","owner":{"login":"cleanflight","id":8776523,"avatar_url":"https://avatars.githubusercontent.com/u/8776523?v=3","gravatar_id":"","url":"https://api.github.com/users/cleanflight","html_url":"https://github.com/cleanflight","followers_url":"https://api.github.com/users/cleanflight/followers","following_url":"https://api.github.com/users/cleanflight/following{/other_user}","gists_url":"https://api.github.com/users/cleanflight/gists{/gist_id}","starred_url":"https://api.github.com/users/cleanflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleanflight/subscriptions","organizations_url":"https://api.github.com/users/cleanflight/orgs","repos_url":"https://api.github.com/users/cleanflight/repos","events_url":"https://api.github.com/users/cleanflight/events{/privacy}","received_events_url":"https://api.github.com/users/cleanflight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cleanflight/cleanflight","description":"Clean-code version of the baseflight flight controller firmware","fork":false,"url":"https://api.github.com/repos/cleanflight/cleanflight","forks_url":"https://api.github.com/repos/cleanflight/cleanflight/forks","keys_url":"https://api.github.com/repos/cleanflight/cleanflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cleanflight/cleanflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cleanflight/cleanflight/teams","hooks_url":"https://api.github.com/repos/cleanflight/cleanflight/hooks","issue_events_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/events{/number}","events_url":"https://api.github.com/repos/cleanflight/cleanflight/events","assignees_url":"https://api.github.com/repos/cleanflight/cleanflight/assignees{/user}","branches_url":"https://api.github.com/repos/cleanflight/cleanflight/branches{/branch}","tags_url":"https://api.github.com/repos/cleanflight/cleanflight/tags","blobs_url":"https://api.github.com/repos/cleanflight/cleanflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cleanflight/cleanflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cleanflight/cleanflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/cleanflight/cleanflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cleanflight/cleanflight/statuses/{sha}","languages_url":"https://api.github.com/repos/cleanflight/cleanflight/languages","stargazers_url":"https://api.github.com/repos/cleanflight/cleanflight/stargazers","contributors_url":"https://api.github.com/repos/cleanflight/cleanflight/contributors","subscribers_url":"https://api.github.com/repos/cleanflight/cleanflight/subscribers","subscription_url":"https://api.github.com/repos/cleanflight/cleanflight/subscription","commits_url":"https://api.github.com/repos/cleanflight/cleanflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/cleanflight/cleanflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/cleanflight/cleanflight/contents/{+path}","compare_url":"https://api.github.com/repos/cleanflight/cleanflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cleanflight/cleanflight/merges","archive_url":"https://api.github.com/repos/cleanflight/cleanflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cleanflight/cleanflight/downloads","issues_url":"https://api.github.com/repos/cleanflight/cleanflight/issues{/number}","pulls_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls{/number}","milestones_url":"https://api.github.com/repos/cleanflight/cleanflight/milestones{/number}","notifications_url":"https://api.github.com/repos/cleanflight/cleanflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cleanflight/cleanflight/labels{/name}","releases_url":"https://api.github.com/repos/cleanflight/cleanflight/releases{/id}","created_at":"2013-03-27T23:49:19Z","updated_at":"2015-03-26T19:41:36Z","pushed_at":"2015-03-26T19:41:35Z","git_url":"git://github.com/cleanflight/cleanflight.git","ssh_url":"git@github.com:cleanflight/cleanflight.git","clone_url":"https://github.com/cleanflight/cleanflight.git","svn_url":"https://github.com/cleanflight/cleanflight","homepage":"http://cleanflight.com","size":51690,"stargazers_count":234,"watchers_count":234,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":168,"mirror_url":null,"open_issues_count":194,"forks":168,"open_issues":194,"watchers":234,"default_branch":"master"}},"base":{"label":"cleanflight:master","ref":"master","sha":"84c7c985ab4b12b327816b51b77e09499b75e900","user":{"login":"cleanflight","id":8776523,"avatar_url":"https://avatars.githubusercontent.com/u/8776523?v=3","gravatar_id":"","url":"https://api.github.com/users/cleanflight","html_url":"https://github.com/cleanflight","followers_url":"https://api.github.com/users/cleanflight/followers","following_url":"https://api.github.com/users/cleanflight/following{/other_user}","gists_url":"https://api.github.com/users/cleanflight/gists{/gist_id}","starred_url":"https://api.github.com/users/cleanflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleanflight/subscriptions","organizations_url":"https://api.github.com/users/cleanflight/orgs","repos_url":"https://api.github.com/users/cleanflight/repos","events_url":"https://api.github.com/users/cleanflight/events{/privacy}","received_events_url":"https://api.github.com/users/cleanflight/received_events","type":"Organization","site_admin":false},"repo":{"id":9066347,"name":"cleanflight","full_name":"cleanflight/cleanflight","owner":{"login":"cleanflight","id":8776523,"avatar_url":"https://avatars.githubusercontent.com/u/8776523?v=3","gravatar_id":"","url":"https://api.github.com/users/cleanflight","html_url":"https://github.com/cleanflight","followers_url":"https://api.github.com/users/cleanflight/followers","following_url":"https://api.github.com/users/cleanflight/following{/other_user}","gists_url":"https://api.github.com/users/cleanflight/gists{/gist_id}","starred_url":"https://api.github.com/users/cleanflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleanflight/subscriptions","organizations_url":"https://api.github.com/users/cleanflight/orgs","repos_url":"https://api.github.com/users/cleanflight/repos","events_url":"https://api.github.com/users/cleanflight/events{/privacy}","received_events_url":"https://api.github.com/users/cleanflight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cleanflight/cleanflight","description":"Clean-code version of the baseflight flight controller firmware","fork":false,"url":"https://api.github.com/repos/cleanflight/cleanflight","forks_url":"https://api.github.com/repos/cleanflight/cleanflight/forks","keys_url":"https://api.github.com/repos/cleanflight/cleanflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cleanflight/cleanflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cleanflight/cleanflight/teams","hooks_url":"https://api.github.com/repos/cleanflight/cleanflight/hooks","issue_events_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/events{/number}","events_url":"https://api.github.com/repos/cleanflight/cleanflight/events","assignees_url":"https://api.github.com/repos/cleanflight/cleanflight/assignees{/user}","branches_url":"https://api.github.com/repos/cleanflight/cleanflight/branches{/branch}","tags_url":"https://api.github.com/repos/cleanflight/cleanflight/tags","blobs_url":"https://api.github.com/repos/cleanflight/cleanflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cleanflight/cleanflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cleanflight/cleanflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/cleanflight/cleanflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cleanflight/cleanflight/statuses/{sha}","languages_url":"https://api.github.com/repos/cleanflight/cleanflight/languages","stargazers_url":"https://api.github.com/repos/cleanflight/cleanflight/stargazers","contributors_url":"https://api.github.com/repos/cleanflight/cleanflight/contributors","subscribers_url":"https://api.github.com/repos/cleanflight/cleanflight/subscribers","subscription_url":"https://api.github.com/repos/cleanflight/cleanflight/subscription","commits_url":"https://api.github.com/repos/cleanflight/cleanflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/cleanflight/cleanflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/cleanflight/cleanflight/contents/{+path}","compare_url":"https://api.github.com/repos/cleanflight/cleanflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cleanflight/cleanflight/merges","archive_url":"https://api.github.com/repos/cleanflight/cleanflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cleanflight/cleanflight/downloads","issues_url":"https://api.github.com/repos/cleanflight/cleanflight/issues{/number}","pulls_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls{/number}","milestones_url":"https://api.github.com/repos/cleanflight/cleanflight/milestones{/number}","notifications_url":"https://api.github.com/repos/cleanflight/cleanflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cleanflight/cleanflight/labels{/name}","releases_url":"https://api.github.com/repos/cleanflight/cleanflight/releases{/id}","created_at":"2013-03-27T23:49:19Z","updated_at":"2015-03-26T19:41:36Z","pushed_at":"2015-03-26T19:41:35Z","git_url":"git://github.com/cleanflight/cleanflight.git","ssh_url":"git@github.com:cleanflight/cleanflight.git","clone_url":"https://github.com/cleanflight/cleanflight.git","svn_url":"https://github.com/cleanflight/cleanflight","homepage":"http://cleanflight.com","size":51690,"stargazers_count":234,"watchers_count":234,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":168,"mirror_url":null,"open_issues_count":194,"forks":168,"open_issues":194,"watchers":234,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/628"},"html":{"href":"https://github.com/cleanflight/cleanflight/pull/628"},"issue":{"href":"https://api.github.com/repos/cleanflight/cleanflight/issues/628"},"comments":{"href":"https://api.github.com/repos/cleanflight/cleanflight/issues/628/comments"},"review_comments":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/628/comments"},"review_comment":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/628/commits"},"statuses":{"href":"https://api.github.com/repos/cleanflight/cleanflight/statuses/3c543d36c803c8d09e36d92b69933b74d3575e75"}}}}