{"action":"created","comment":{"url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments/53881684","id":53881684,"diff_hunk":"@@ -0,0 +1,352 @@\n+/**\n+ ******************************************************************************\n+ * @addtogroup PIOS PIOS Core hardware abstraction layer\n+ * @{\n+ * @addtogroup   PIOS_FSKDAC FSK DAC Functions\n+ * @brief PIOS interface for FSK DAC implementation\n+ * @{\n+ *\n+ * @file       pios_fskdac.c\n+ * @author     Tau Labs, http://taulabs.org, Copyright (C) 2015-2016\n+ * @brief      Generates Bel202 encoded serial data on the DAC channel\n+ * @see        The GNU Public License (GPL) Version 3\n+ *\n+ *****************************************************************************/\n+/*\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 3 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful, but\n+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n+ * for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License along\n+ * with this program; if not, write to the Free Software Foundation, Inc.,\n+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n+ */\n+\n+/* Project Includes */\n+#include \"pios.h\"\n+#if defined(PIOS_INCLUDE_FSK)\n+\n+#if defined(PIOS_INCLUDE_FREERTOS)\n+#include \"FreeRTOS.h\"\n+#endif /* defined(PIOS_INCLUDE_FREERTOS) */\n+\n+#include \"pios_dac_common.h\"\n+#include \"physical_constants.h\"\n+\n+/* Private methods */\n+static void PIOS_FSKDAC_DMA_irq_cb();\n+\n+/* Provide a COM driver */\n+static void PIOS_FSKDAC_RegisterTxCallback(uintptr_t fskdac_id, pios_com_callback tx_out_cb, uintptr_t context);\n+static void PIOS_FSKDAC_TxStart(uintptr_t fskdac_id, uint16_t tx_bytes_avail);\n+\n+const struct pios_com_driver pios_fskdac_com_driver = {\n+\t.tx_start   = PIOS_FSKDAC_TxStart,\n+\t.bind_tx_cb = PIOS_FSKDAC_RegisterTxCallback,\n+};\n+\n+enum pios_fskdac_dev_magic {\n+\tPIOS_FSKDAC_DEV_MAGIC = 0x1453834A,\n+};\n+\n+enum BYTE_TX_STATE {\n+\tIDLE, START, BIT0, BIT1, BIT2,\n+\tBIT3, BIT4, BIT5, BIT6, BIT7,\n+\tPARITY, STOP\n+};\n+\n+struct pios_fskdac_dev {\n+\tenum pios_fskdac_dev_magic     magic;","path":"flight/PiOS/STM32F4xx/pios_fskdac.c","position":65,"original_position":65,"commit_id":"82605d869662bdaedcda3fa67a9c7f1e3ebc03e8","original_commit_id":"82605d869662bdaedcda3fa67a9c7f1e3ebc03e8","user":{"login":"kubark42","id":1118185,"avatar_url":"https://avatars.githubusercontent.com/u/1118185?v=3","gravatar_id":"","url":"https://api.github.com/users/kubark42","html_url":"https://github.com/kubark42","followers_url":"https://api.github.com/users/kubark42/followers","following_url":"https://api.github.com/users/kubark42/following{/other_user}","gists_url":"https://api.github.com/users/kubark42/gists{/gist_id}","starred_url":"https://api.github.com/users/kubark42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubark42/subscriptions","organizations_url":"https://api.github.com/users/kubark42/orgs","repos_url":"https://api.github.com/users/kubark42/repos","events_url":"https://api.github.com/users/kubark42/events{/privacy}","received_events_url":"https://api.github.com/users/kubark42/received_events","type":"User","site_admin":false},"body":"Extra whitespace.","created_at":"2016-02-24T01:30:51Z","updated_at":"2016-02-24T01:30:51Z","html_url":"https://github.com/TauLabs/TauLabs/pull/2202#discussion_r53881684","pull_request_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2202","_links":{"self":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments/53881684"},"html":{"href":"https://github.com/TauLabs/TauLabs/pull/2202#discussion_r53881684"},"pull_request":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2202"}}},"pull_request":{"url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2202","id":60398955,"html_url":"https://github.com/TauLabs/TauLabs/pull/2202","diff_url":"https://github.com/TauLabs/TauLabs/pull/2202.diff","patch_url":"https://github.com/TauLabs/TauLabs/pull/2202.patch","issue_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/2202","number":2202,"state":"open","locked":false,"title":"FSK DAC: 1200bps telemetry over audio","user":{"login":"peabody124","id":618346,"avatar_url":"https://avatars.githubusercontent.com/u/618346?v=3","gravatar_id":"","url":"https://api.github.com/users/peabody124","html_url":"https://github.com/peabody124","followers_url":"https://api.github.com/users/peabody124/followers","following_url":"https://api.github.com/users/peabody124/following{/other_user}","gists_url":"https://api.github.com/users/peabody124/gists{/gist_id}","starred_url":"https://api.github.com/users/peabody124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peabody124/subscriptions","organizations_url":"https://api.github.com/users/peabody124/orgs","repos_url":"https://api.github.com/users/peabody124/repos","events_url":"https://api.github.com/users/peabody124/events{/privacy}","received_events_url":"https://api.github.com/users/peabody124/received_events","type":"User","site_admin":false},"body":"This creates a PIOS_COM interace to the DAC output that creates\r\na 1200bps audio modem. The stream is modulated similarly to V.23\r\nencoding using 1 start and 1 stop bits, 1 parity bit. The two symbols\r\nare centered at 1200 and 2200 Hz.\r\n\r\nThe data source tested with this is the light telemetry module that was\r\ndeveloped for this purpose of low bandwidth telemetry, previously using\r\na hardware serial stream to audio modem chip. ","created_at":"2016-02-23T19:53:03Z","updated_at":"2016-02-24T01:30:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15bf83bceb31a20cbca2e963a6dd09c6362ee28c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2202/commits","review_comments_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2202/comments","review_comment_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/2202/comments","statuses_url":"https://api.github.com/repos/TauLabs/TauLabs/statuses/82605d869662bdaedcda3fa67a9c7f1e3ebc03e8","head":{"label":"peabody124:fskdac","ref":"fskdac","sha":"82605d869662bdaedcda3fa67a9c7f1e3ebc03e8","user":{"login":"peabody124","id":618346,"avatar_url":"https://avatars.githubusercontent.com/u/618346?v=3","gravatar_id":"","url":"https://api.github.com/users/peabody124","html_url":"https://github.com/peabody124","followers_url":"https://api.github.com/users/peabody124/followers","following_url":"https://api.github.com/users/peabody124/following{/other_user}","gists_url":"https://api.github.com/users/peabody124/gists{/gist_id}","starred_url":"https://api.github.com/users/peabody124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peabody124/subscriptions","organizations_url":"https://api.github.com/users/peabody124/orgs","repos_url":"https://api.github.com/users/peabody124/repos","events_url":"https://api.github.com/users/peabody124/events{/privacy}","received_events_url":"https://api.github.com/users/peabody124/received_events","type":"User","site_admin":false},"repo":{"id":6857409,"name":"TauLabs","full_name":"peabody124/TauLabs","owner":{"login":"peabody124","id":618346,"avatar_url":"https://avatars.githubusercontent.com/u/618346?v=3","gravatar_id":"","url":"https://api.github.com/users/peabody124","html_url":"https://github.com/peabody124","followers_url":"https://api.github.com/users/peabody124/followers","following_url":"https://api.github.com/users/peabody124/following{/other_user}","gists_url":"https://api.github.com/users/peabody124/gists{/gist_id}","starred_url":"https://api.github.com/users/peabody124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peabody124/subscriptions","organizations_url":"https://api.github.com/users/peabody124/orgs","repos_url":"https://api.github.com/users/peabody124/repos","events_url":"https://api.github.com/users/peabody124/events{/privacy}","received_events_url":"https://api.github.com/users/peabody124/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peabody124/TauLabs","description":"","fork":true,"url":"https://api.github.com/repos/peabody124/TauLabs","forks_url":"https://api.github.com/repos/peabody124/TauLabs/forks","keys_url":"https://api.github.com/repos/peabody124/TauLabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peabody124/TauLabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peabody124/TauLabs/teams","hooks_url":"https://api.github.com/repos/peabody124/TauLabs/hooks","issue_events_url":"https://api.github.com/repos/peabody124/TauLabs/issues/events{/number}","events_url":"https://api.github.com/repos/peabody124/TauLabs/events","assignees_url":"https://api.github.com/repos/peabody124/TauLabs/assignees{/user}","branches_url":"https://api.github.com/repos/peabody124/TauLabs/branches{/branch}","tags_url":"https://api.github.com/repos/peabody124/TauLabs/tags","blobs_url":"https://api.github.com/repos/peabody124/TauLabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peabody124/TauLabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peabody124/TauLabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/peabody124/TauLabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peabody124/TauLabs/statuses/{sha}","languages_url":"https://api.github.com/repos/peabody124/TauLabs/languages","stargazers_url":"https://api.github.com/repos/peabody124/TauLabs/stargazers","contributors_url":"https://api.github.com/repos/peabody124/TauLabs/contributors","subscribers_url":"https://api.github.com/repos/peabody124/TauLabs/subscribers","subscription_url":"https://api.github.com/repos/peabody124/TauLabs/subscription","commits_url":"https://api.github.com/repos/peabody124/TauLabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/peabody124/TauLabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/peabody124/TauLabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/peabody124/TauLabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/peabody124/TauLabs/contents/{+path}","compare_url":"https://api.github.com/repos/peabody124/TauLabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peabody124/TauLabs/merges","archive_url":"https://api.github.com/repos/peabody124/TauLabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peabody124/TauLabs/downloads","issues_url":"https://api.github.com/repos/peabody124/TauLabs/issues{/number}","pulls_url":"https://api.github.com/repos/peabody124/TauLabs/pulls{/number}","milestones_url":"https://api.github.com/repos/peabody124/TauLabs/milestones{/number}","notifications_url":"https://api.github.com/repos/peabody124/TauLabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peabody124/TauLabs/labels{/name}","releases_url":"https://api.github.com/repos/peabody124/TauLabs/releases{/id}","deployments_url":"https://api.github.com/repos/peabody124/TauLabs/deployments","created_at":"2012-11-25T23:51:40Z","updated_at":"2015-10-16T12:04:22Z","pushed_at":"2016-02-23T21:19:13Z","git_url":"git://github.com/peabody124/TauLabs.git","ssh_url":"git@github.com:peabody124/TauLabs.git","clone_url":"https://github.com/peabody124/TauLabs.git","svn_url":"https://github.com/peabody124/TauLabs","homepage":null,"size":217867,"stargazers_count":13,"watchers_count":13,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":4,"forks":6,"open_issues":4,"watchers":13,"default_branch":"next"}},"base":{"label":"TauLabs:next","ref":"next","sha":"bcfc7d91cf59d7c82ad194bddb7543765aab5325","user":{"login":"TauLabs","id":3201381,"avatar_url":"https://avatars.githubusercontent.com/u/3201381?v=3","gravatar_id":"","url":"https://api.github.com/users/TauLabs","html_url":"https://github.com/TauLabs","followers_url":"https://api.github.com/users/TauLabs/followers","following_url":"https://api.github.com/users/TauLabs/following{/other_user}","gists_url":"https://api.github.com/users/TauLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/TauLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TauLabs/subscriptions","organizations_url":"https://api.github.com/users/TauLabs/orgs","repos_url":"https://api.github.com/users/TauLabs/repos","events_url":"https://api.github.com/users/TauLabs/events{/privacy}","received_events_url":"https://api.github.com/users/TauLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":6589168,"name":"TauLabs","full_name":"TauLabs/TauLabs","owner":{"login":"TauLabs","id":3201381,"avatar_url":"https://avatars.githubusercontent.com/u/3201381?v=3","gravatar_id":"","url":"https://api.github.com/users/TauLabs","html_url":"https://github.com/TauLabs","followers_url":"https://api.github.com/users/TauLabs/followers","following_url":"https://api.github.com/users/TauLabs/following{/other_user}","gists_url":"https://api.github.com/users/TauLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/TauLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TauLabs/subscriptions","organizations_url":"https://api.github.com/users/TauLabs/orgs","repos_url":"https://api.github.com/users/TauLabs/repos","events_url":"https://api.github.com/users/TauLabs/events{/privacy}","received_events_url":"https://api.github.com/users/TauLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TauLabs/TauLabs","description":"","fork":false,"url":"https://api.github.com/repos/TauLabs/TauLabs","forks_url":"https://api.github.com/repos/TauLabs/TauLabs/forks","keys_url":"https://api.github.com/repos/TauLabs/TauLabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TauLabs/TauLabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TauLabs/TauLabs/teams","hooks_url":"https://api.github.com/repos/TauLabs/TauLabs/hooks","issue_events_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/events{/number}","events_url":"https://api.github.com/repos/TauLabs/TauLabs/events","assignees_url":"https://api.github.com/repos/TauLabs/TauLabs/assignees{/user}","branches_url":"https://api.github.com/repos/TauLabs/TauLabs/branches{/branch}","tags_url":"https://api.github.com/repos/TauLabs/TauLabs/tags","blobs_url":"https://api.github.com/repos/TauLabs/TauLabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TauLabs/TauLabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TauLabs/TauLabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/TauLabs/TauLabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TauLabs/TauLabs/statuses/{sha}","languages_url":"https://api.github.com/repos/TauLabs/TauLabs/languages","stargazers_url":"https://api.github.com/repos/TauLabs/TauLabs/stargazers","contributors_url":"https://api.github.com/repos/TauLabs/TauLabs/contributors","subscribers_url":"https://api.github.com/repos/TauLabs/TauLabs/subscribers","subscription_url":"https://api.github.com/repos/TauLabs/TauLabs/subscription","commits_url":"https://api.github.com/repos/TauLabs/TauLabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/TauLabs/TauLabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/TauLabs/TauLabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/TauLabs/TauLabs/contents/{+path}","compare_url":"https://api.github.com/repos/TauLabs/TauLabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TauLabs/TauLabs/merges","archive_url":"https://api.github.com/repos/TauLabs/TauLabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TauLabs/TauLabs/downloads","issues_url":"https://api.github.com/repos/TauLabs/TauLabs/issues{/number}","pulls_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls{/number}","milestones_url":"https://api.github.com/repos/TauLabs/TauLabs/milestones{/number}","notifications_url":"https://api.github.com/repos/TauLabs/TauLabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TauLabs/TauLabs/labels{/name}","releases_url":"https://api.github.com/repos/TauLabs/TauLabs/releases{/id}","deployments_url":"https://api.github.com/repos/TauLabs/TauLabs/deployments","created_at":"2012-11-08T01:01:18Z","updated_at":"2016-02-19T12:37:43Z","pushed_at":"2016-02-23T21:21:30Z","git_url":"git://github.com/TauLabs/TauLabs.git","ssh_url":"git@github.com:TauLabs/TauLabs.git","clone_url":"https://github.com/TauLabs/TauLabs.git","svn_url":"https://github.com/TauLabs/TauLabs","homepage":"taulabs.org","size":281896,"stargazers_count":320,"watchers_count":320,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":354,"mirror_url":null,"open_issues_count":290,"forks":354,"open_issues":290,"watchers":320,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2202"},"html":{"href":"https://github.com/TauLabs/TauLabs/pull/2202"},"issue":{"href":"https://api.github.com/repos/TauLabs/TauLabs/issues/2202"},"comments":{"href":"https://api.github.com/repos/TauLabs/TauLabs/issues/2202/comments"},"review_comments":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2202/comments"},"review_comment":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/2202/commits"},"statuses":{"href":"https://api.github.com/repos/TauLabs/TauLabs/statuses/82605d869662bdaedcda3fa67a9c7f1e3ebc03e8"}}}}