{"action":"created","comment":{"url":"https://api.github.com/repos/mbedmicro/mbed/pulls/comments/32197468","id":32197468,"diff_hunk":"@@ -62,16 +62,20 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {\n     UART_HAL_SetStopBitCount(uart_addrs[obj->index], kUartOneStopBit);\n     #endif\n     UART_HAL_SetBitCountPerChar(uart_addrs[obj->index], kUart8BitsPerChar);\n-    UART_HAL_EnableTransmitter(uart_addrs[obj->index]);\n-    UART_HAL_EnableReceiver(uart_addrs[obj->index]);\n+    UART_HAL_DisableTransmitter(uart_addrs[obj->index]);\n+    UART_HAL_DisableReceiver(uart_addrs[obj->index]);\n \n     pinmap_pinout(tx, PinMap_UART_TX);\n     pinmap_pinout(rx, PinMap_UART_RX);\n \n     if (tx != NC) {\n+        UART_HAL_FlushTxFifo(uart_addrs[obj->index]);","path":"libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/serial_api.c","position":13,"original_position":13,"commit_id":"75547f2b71d54b78bdac2d7ec51fd59fa66557c6","original_commit_id":"75547f2b71d54b78bdac2d7ec51fd59fa66557c6","user":{"login":"0xc0170","id":2963726,"avatar_url":"https://avatars.githubusercontent.com/u/2963726?v=3","gravatar_id":"","url":"https://api.github.com/users/0xc0170","html_url":"https://github.com/0xc0170","followers_url":"https://api.github.com/users/0xc0170/followers","following_url":"https://api.github.com/users/0xc0170/following{/other_user}","gists_url":"https://api.github.com/users/0xc0170/gists{/gist_id}","starred_url":"https://api.github.com/users/0xc0170/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xc0170/subscriptions","organizations_url":"https://api.github.com/users/0xc0170/orgs","repos_url":"https://api.github.com/users/0xc0170/repos","events_url":"https://api.github.com/users/0xc0170/events{/privacy}","received_events_url":"https://api.github.com/users/0xc0170/received_events","type":"User","site_admin":false},"body":"+1 for this PR, I had one fix for KSDK on a branch, here's the code \r\n\r\n```\r\n    // Fifo Rx/Tx enabled by default. TX can be enabled/disable only if RE is disabled also\r\n    if (tx != NC) {\r\n        pin_mode(tx, PullUp);\r\n        UART_HAL_SetTxFifoCmd(obj->serial.address, true);\r\n        UART_HAL_FlushTxFifo(obj->serial.address);\r\n        UART_HAL_EnableTransmitter(obj->serial.address);\r\n    }\r\n    if (rx != NC) {\r\n        pin_mode(rx, PullUp);\r\n        UART_HAL_SetRxFifoCmd(obj->serial.address, true);\r\n        UART_HAL_FlushRxFifo(obj->serial.address);\r\n        UART_HAL_EnableReceiver(obj->serial.address);\r\n    }\r\n```\r\nwonder why you flush tx fifo but not rx .","created_at":"2015-06-11T07:59:41Z","updated_at":"2015-06-11T07:59:41Z","html_url":"https://github.com/mbedmicro/mbed/pull/1176#discussion_r32197468","pull_request_url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1176","_links":{"self":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/comments/32197468"},"html":{"href":"https://github.com/mbedmicro/mbed/pull/1176#discussion_r32197468"},"pull_request":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/1176"}}},"pull_request":{"url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1176","id":37383015,"html_url":"https://github.com/mbedmicro/mbed/pull/1176","diff_url":"https://github.com/mbedmicro/mbed/pull/1176.diff","patch_url":"https://github.com/mbedmicro/mbed/pull/1176.patch","issue_url":"https://api.github.com/repos/mbedmicro/mbed/issues/1176","number":1176,"state":"open","locked":false,"title":"Fix handling of Serial NC pins in K64F,K22F,KL25Z, and KL46Z","user":{"login":"bridadan","id":3123977,"avatar_url":"https://avatars.githubusercontent.com/u/3123977?v=3","gravatar_id":"","url":"https://api.github.com/users/bridadan","html_url":"https://github.com/bridadan","followers_url":"https://api.github.com/users/bridadan/followers","following_url":"https://api.github.com/users/bridadan/following{/other_user}","gists_url":"https://api.github.com/users/bridadan/gists{/gist_id}","starred_url":"https://api.github.com/users/bridadan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bridadan/subscriptions","organizations_url":"https://api.github.com/users/bridadan/orgs","repos_url":"https://api.github.com/users/bridadan/repos","events_url":"https://api.github.com/users/bridadan/events{/privacy}","received_events_url":"https://api.github.com/users/bridadan/received_events","type":"User","site_admin":false},"body":"This pull request fixes how the Freescale boards K64F,K22F,KL25Z, and KL46Z handle having one of the serial pins set to NC.","created_at":"2015-06-10T17:22:55Z","updated_at":"2015-06-11T07:59:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf1f224f1d82db217c1956907c50a71081cd3ac1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1176/commits","review_comments_url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1176/comments","review_comment_url":"https://api.github.com/repos/mbedmicro/mbed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mbedmicro/mbed/issues/1176/comments","statuses_url":"https://api.github.com/repos/mbedmicro/mbed/statuses/75547f2b71d54b78bdac2d7ec51fd59fa66557c6","head":{"label":"bridadan:freescale-serial-nc-fix","ref":"freescale-serial-nc-fix","sha":"75547f2b71d54b78bdac2d7ec51fd59fa66557c6","user":{"login":"bridadan","id":3123977,"avatar_url":"https://avatars.githubusercontent.com/u/3123977?v=3","gravatar_id":"","url":"https://api.github.com/users/bridadan","html_url":"https://github.com/bridadan","followers_url":"https://api.github.com/users/bridadan/followers","following_url":"https://api.github.com/users/bridadan/following{/other_user}","gists_url":"https://api.github.com/users/bridadan/gists{/gist_id}","starred_url":"https://api.github.com/users/bridadan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bridadan/subscriptions","organizations_url":"https://api.github.com/users/bridadan/orgs","repos_url":"https://api.github.com/users/bridadan/repos","events_url":"https://api.github.com/users/bridadan/events{/privacy}","received_events_url":"https://api.github.com/users/bridadan/received_events","type":"User","site_admin":false},"repo":{"id":31221716,"name":"mbed","full_name":"bridadan/mbed","owner":{"login":"bridadan","id":3123977,"avatar_url":"https://avatars.githubusercontent.com/u/3123977?v=3","gravatar_id":"","url":"https://api.github.com/users/bridadan","html_url":"https://github.com/bridadan","followers_url":"https://api.github.com/users/bridadan/followers","following_url":"https://api.github.com/users/bridadan/following{/other_user}","gists_url":"https://api.github.com/users/bridadan/gists{/gist_id}","starred_url":"https://api.github.com/users/bridadan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bridadan/subscriptions","organizations_url":"https://api.github.com/users/bridadan/orgs","repos_url":"https://api.github.com/users/bridadan/repos","events_url":"https://api.github.com/users/bridadan/events{/privacy}","received_events_url":"https://api.github.com/users/bridadan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bridadan/mbed","description":"mbed libraries and tools","fork":true,"url":"https://api.github.com/repos/bridadan/mbed","forks_url":"https://api.github.com/repos/bridadan/mbed/forks","keys_url":"https://api.github.com/repos/bridadan/mbed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bridadan/mbed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bridadan/mbed/teams","hooks_url":"https://api.github.com/repos/bridadan/mbed/hooks","issue_events_url":"https://api.github.com/repos/bridadan/mbed/issues/events{/number}","events_url":"https://api.github.com/repos/bridadan/mbed/events","assignees_url":"https://api.github.com/repos/bridadan/mbed/assignees{/user}","branches_url":"https://api.github.com/repos/bridadan/mbed/branches{/branch}","tags_url":"https://api.github.com/repos/bridadan/mbed/tags","blobs_url":"https://api.github.com/repos/bridadan/mbed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bridadan/mbed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bridadan/mbed/git/refs{/sha}","trees_url":"https://api.github.com/repos/bridadan/mbed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bridadan/mbed/statuses/{sha}","languages_url":"https://api.github.com/repos/bridadan/mbed/languages","stargazers_url":"https://api.github.com/repos/bridadan/mbed/stargazers","contributors_url":"https://api.github.com/repos/bridadan/mbed/contributors","subscribers_url":"https://api.github.com/repos/bridadan/mbed/subscribers","subscription_url":"https://api.github.com/repos/bridadan/mbed/subscription","commits_url":"https://api.github.com/repos/bridadan/mbed/commits{/sha}","git_commits_url":"https://api.github.com/repos/bridadan/mbed/git/commits{/sha}","comments_url":"https://api.github.com/repos/bridadan/mbed/comments{/number}","issue_comment_url":"https://api.github.com/repos/bridadan/mbed/issues/comments{/number}","contents_url":"https://api.github.com/repos/bridadan/mbed/contents/{+path}","compare_url":"https://api.github.com/repos/bridadan/mbed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bridadan/mbed/merges","archive_url":"https://api.github.com/repos/bridadan/mbed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bridadan/mbed/downloads","issues_url":"https://api.github.com/repos/bridadan/mbed/issues{/number}","pulls_url":"https://api.github.com/repos/bridadan/mbed/pulls{/number}","milestones_url":"https://api.github.com/repos/bridadan/mbed/milestones{/number}","notifications_url":"https://api.github.com/repos/bridadan/mbed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bridadan/mbed/labels{/name}","releases_url":"https://api.github.com/repos/bridadan/mbed/releases{/id}","created_at":"2015-02-23T18:09:54Z","updated_at":"2015-04-14T19:31:53Z","pushed_at":"2015-06-10T17:20:32Z","git_url":"git://github.com/bridadan/mbed.git","ssh_url":"git@github.com:bridadan/mbed.git","clone_url":"https://github.com/bridadan/mbed.git","svn_url":"https://github.com/bridadan/mbed","homepage":null,"size":24964,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mbedmicro:master","ref":"master","sha":"6b2cd339eef438b99e0c685df44a9a85cd7d7053","user":{"login":"mbedmicro","id":3626466,"avatar_url":"https://avatars.githubusercontent.com/u/3626466?v=3","gravatar_id":"","url":"https://api.github.com/users/mbedmicro","html_url":"https://github.com/mbedmicro","followers_url":"https://api.github.com/users/mbedmicro/followers","following_url":"https://api.github.com/users/mbedmicro/following{/other_user}","gists_url":"https://api.github.com/users/mbedmicro/gists{/gist_id}","starred_url":"https://api.github.com/users/mbedmicro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbedmicro/subscriptions","organizations_url":"https://api.github.com/users/mbedmicro/orgs","repos_url":"https://api.github.com/users/mbedmicro/repos","events_url":"https://api.github.com/users/mbedmicro/events{/privacy}","received_events_url":"https://api.github.com/users/mbedmicro/received_events","type":"Organization","site_admin":false},"repo":{"id":8270972,"name":"mbed","full_name":"mbedmicro/mbed","owner":{"login":"mbedmicro","id":3626466,"avatar_url":"https://avatars.githubusercontent.com/u/3626466?v=3","gravatar_id":"","url":"https://api.github.com/users/mbedmicro","html_url":"https://github.com/mbedmicro","followers_url":"https://api.github.com/users/mbedmicro/followers","following_url":"https://api.github.com/users/mbedmicro/following{/other_user}","gists_url":"https://api.github.com/users/mbedmicro/gists{/gist_id}","starred_url":"https://api.github.com/users/mbedmicro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbedmicro/subscriptions","organizations_url":"https://api.github.com/users/mbedmicro/orgs","repos_url":"https://api.github.com/users/mbedmicro/repos","events_url":"https://api.github.com/users/mbedmicro/events{/privacy}","received_events_url":"https://api.github.com/users/mbedmicro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mbedmicro/mbed","description":"mbed libraries and tools","fork":false,"url":"https://api.github.com/repos/mbedmicro/mbed","forks_url":"https://api.github.com/repos/mbedmicro/mbed/forks","keys_url":"https://api.github.com/repos/mbedmicro/mbed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbedmicro/mbed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbedmicro/mbed/teams","hooks_url":"https://api.github.com/repos/mbedmicro/mbed/hooks","issue_events_url":"https://api.github.com/repos/mbedmicro/mbed/issues/events{/number}","events_url":"https://api.github.com/repos/mbedmicro/mbed/events","assignees_url":"https://api.github.com/repos/mbedmicro/mbed/assignees{/user}","branches_url":"https://api.github.com/repos/mbedmicro/mbed/branches{/branch}","tags_url":"https://api.github.com/repos/mbedmicro/mbed/tags","blobs_url":"https://api.github.com/repos/mbedmicro/mbed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbedmicro/mbed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbedmicro/mbed/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbedmicro/mbed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbedmicro/mbed/statuses/{sha}","languages_url":"https://api.github.com/repos/mbedmicro/mbed/languages","stargazers_url":"https://api.github.com/repos/mbedmicro/mbed/stargazers","contributors_url":"https://api.github.com/repos/mbedmicro/mbed/contributors","subscribers_url":"https://api.github.com/repos/mbedmicro/mbed/subscribers","subscription_url":"https://api.github.com/repos/mbedmicro/mbed/subscription","commits_url":"https://api.github.com/repos/mbedmicro/mbed/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbedmicro/mbed/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbedmicro/mbed/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbedmicro/mbed/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbedmicro/mbed/contents/{+path}","compare_url":"https://api.github.com/repos/mbedmicro/mbed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbedmicro/mbed/merges","archive_url":"https://api.github.com/repos/mbedmicro/mbed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbedmicro/mbed/downloads","issues_url":"https://api.github.com/repos/mbedmicro/mbed/issues{/number}","pulls_url":"https://api.github.com/repos/mbedmicro/mbed/pulls{/number}","milestones_url":"https://api.github.com/repos/mbedmicro/mbed/milestones{/number}","notifications_url":"https://api.github.com/repos/mbedmicro/mbed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbedmicro/mbed/labels{/name}","releases_url":"https://api.github.com/repos/mbedmicro/mbed/releases{/id}","created_at":"2013-02-18T15:23:11Z","updated_at":"2015-06-10T01:46:21Z","pushed_at":"2015-06-11T07:33:05Z","git_url":"git://github.com/mbedmicro/mbed.git","ssh_url":"git@github.com:mbedmicro/mbed.git","clone_url":"https://github.com/mbedmicro/mbed.git","svn_url":"https://github.com/mbedmicro/mbed","homepage":null,"size":44050,"stargazers_count":421,"watchers_count":421,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":445,"mirror_url":null,"open_issues_count":108,"forks":445,"open_issues":108,"watchers":421,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/1176"},"html":{"href":"https://github.com/mbedmicro/mbed/pull/1176"},"issue":{"href":"https://api.github.com/repos/mbedmicro/mbed/issues/1176"},"comments":{"href":"https://api.github.com/repos/mbedmicro/mbed/issues/1176/comments"},"review_comments":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/1176/comments"},"review_comment":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mbedmicro/mbed/pulls/1176/commits"},"statuses":{"href":"https://api.github.com/repos/mbedmicro/mbed/statuses/75547f2b71d54b78bdac2d7ec51fd59fa66557c6"}}}}