{"action":"created","comment":{"url":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments/167321886","pull_request_review_id":95533147,"id":167321886,"diff_hunk":"@@ -0,0 +1,84 @@\n+#pragma once\n+\n+#define ADS1015_I2C_ADDRESS_GND ((uint8_t)0x48)\n+\n+#define ADS1015_ADDRESS_POINTER_CONV ((uint8_t)0x0)\n+#define ADS1015_ADDRESS_POINTER_CONFIG ((uint8_t)0x1)\n+#define ADS1015_ADDRESS_POINTER_LO_THRESH ((uint8_t)0x2)\n+#define ADS1015_ADDRESS_POINTER_HI_THRESH ((uint8_t)0x3)\n+\n+#define ADS1015_LO_THRESH_REGISTER_MSB ((uint8_t)0x0)\n+#define ADS1015_LO_THRESH_REGISTER_LSB ((uint8_t)0x0)\n+#define ADS1015_HI_THRESH_REGISTER_MSB ((uint8_t)0xFF)\n+#define ADS1015_HI_THRESH_REGISTER_LSB ((uint8_t)0xFF)\n+\n+#define ADS1015_NO_EFFECT ((uint8_t)0x0 << 7)\n+#define ADS1015_START_SINGLE_CONV ((uint8_t)0x1 << 7)\n+\n+#define ADS1015_AIN_0 ((uint8_t)0x4 << 4)\n+#define ADS1015_AIN_1 ((uint8_t)0x5 << 4)\n+#define ADS1015_AIN_2 ((uint8_t)0x6 << 4)\n+#define ADS1015_AIN_3 ((uint8_t)0x7 << 4)\n+\n+#define ADS1015_PGA_FSR_6144 ((uint8_t)0x0 << 1)  // ±6.144 V\n+#define ADS1015_PGA_FSR_4096 ((uint8_t)0x1 << 1)  // ±4.096 V\n+#define ADS1015_PGA_FSR_2048 ((uint8_t)0x2 << 1)  // ±2.048 V\n+#define ADS1015_PGA_FSR_1024 ((uint8_t)0x3 << 1)  // ±1.024 V\n+#define ADS1015_PGA_FSR_512 ((uint8_t)0x4 << 1)   // ±0.512 V\n+#define ADS1015_PGA_FSR_256 ((uint8_t)0x5 << 1)   // ±0.256 V\n+\n+#define ADS1015_CONVERSION_MODE_CONT ((uint8_t)0x0)\n+#define ADS1015_CONVERSION_MODE_SINGLE ((uint8_t)0x1)  // default\n+\n+#define ADS1015_DATA_RATE_128 ((uint8_t)0x0 << 5)   //  128 SPS\n+#define ADS1015_DATA_RATE_250 ((uint8_t)0x1 << 5)   //  250 SPS\n+#define ADS1015_DATA_RATE_490 ((uint8_t)0x2 << 5)   //  490 SPS\n+#define ADS1015_DATA_RATE_920 ((uint8_t)0x3 << 5)   //  920 SPS\n+#define ADS1015_DATA_RATE_1600 ((uint8_t)0x4 << 5)  // 1600 SPS\n+#define ADS1015_DATA_RATE_2400 ((uint8_t)0x5 << 5)  // 2400 SPS\n+#define ADS1015_DATA_RATE_3300 ((uint8_t)0x6 << 5)  // 3300 SPS\n+\n+#define ADS1015_COMP_MODE_TRAD ((uint8_t)0x0 << 4)\n+#define ADS1015_COMP_MODE_WINDOW ((uint8_t)0x1 << 4)\n+\n+#define ADS1015_COMP_POL_LOW ((uint8_t)0x0 << 3)\n+#define ADS1015_COMP_POL_HIGH ((uint8_t)0x1 << 3)\n+\n+#define ADS1015_COMP_LAT_NON_LATCHING ((uint8_t)0x0 << 2)\n+#define ADS1015_COMP_LAT_LATCHING ((uint8_t)0x1 << 2)\n+\n+#define ADS1015_COMP_QUE_1_CONV ((uint8_t)0x0)\n+#define ADS1015_COMP_QUE_2_CONV ((uint8_t)0x1)\n+#define ADS1015_COMP_QUE_4_CONV ((uint8_t)0x2)\n+#define ADS1015_COMP_QUE_DISABLE_COMP ((uint8_t)0x3)\n+\n+#define ADS1015_I2C_GENERAL_CALL ((uint8_t)0x0)\n+\n+#define ADS1015_RESET_BYTE ((uint8_t)0x6)\n+\n+#define CONFIG_REGISTER_MSB_0                                         \\","path":"projects/driver_controls/inc/stm32f0xx/ads1015_def.h","position":59,"original_position":59,"commit_id":"da04a28ceee14c18ba6c0ddf333096c5038771eb","original_commit_id":"da04a28ceee14c18ba6c0ddf333096c5038771eb","user":{"login":"a3farmah","id":32603090,"avatar_url":"https://avatars1.githubusercontent.com/u/32603090?v=4","gravatar_id":"","url":"https://api.github.com/users/a3farmah","html_url":"https://github.com/a3farmah","followers_url":"https://api.github.com/users/a3farmah/followers","following_url":"https://api.github.com/users/a3farmah/following{/other_user}","gists_url":"https://api.github.com/users/a3farmah/gists{/gist_id}","starred_url":"https://api.github.com/users/a3farmah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a3farmah/subscriptions","organizations_url":"https://api.github.com/users/a3farmah/orgs","repos_url":"https://api.github.com/users/a3farmah/repos","events_url":"https://api.github.com/users/a3farmah/events{/privacy}","received_events_url":"https://api.github.com/users/a3farmah/received_events","type":"User","site_admin":false},"body":"They are for changing to multiple channels. Is it good enough if I just add a comment and change to a better name?","created_at":"2018-02-09T19:21:05Z","updated_at":"2018-02-09T19:21:05Z","html_url":"https://github.com/uw-midsun/firmware/pull/123#discussion_r167321886","pull_request_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/123","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments/167321886"},"html":{"href":"https://github.com/uw-midsun/firmware/pull/123#discussion_r167321886"},"pull_request":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/123"}},"in_reply_to_id":167144054},"pull_request":{"url":"https://api.github.com/repos/uw-midsun/firmware/pulls/123","id":168132729,"html_url":"https://github.com/uw-midsun/firmware/pull/123","diff_url":"https://github.com/uw-midsun/firmware/pull/123.diff","patch_url":"https://github.com/uw-midsun/firmware/pull/123.patch","issue_url":"https://api.github.com/repos/uw-midsun/firmware/issues/123","number":123,"state":"open","locked":false,"title":"ELEC-217: ADS1015","user":{"login":"a3farmah","id":32603090,"avatar_url":"https://avatars1.githubusercontent.com/u/32603090?v=4","gravatar_id":"","url":"https://api.github.com/users/a3farmah","html_url":"https://github.com/a3farmah","followers_url":"https://api.github.com/users/a3farmah/followers","following_url":"https://api.github.com/users/a3farmah/following{/other_user}","gists_url":"https://api.github.com/users/a3farmah/gists{/gist_id}","starred_url":"https://api.github.com/users/a3farmah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a3farmah/subscriptions","organizations_url":"https://api.github.com/users/a3farmah/orgs","repos_url":"https://api.github.com/users/a3farmah/repos","events_url":"https://api.github.com/users/a3farmah/events{/privacy}","received_events_url":"https://api.github.com/users/a3farmah/received_events","type":"User","site_admin":false},"body":"This branch has to do with ads1015.\r\nThe main functions are working and are documented. I tested them using multi meter. The module does not support continuous conversion. More testing is required for private functions on twos complement and also configure_channel since it is failing my tests which are uncommented for now.\r\n","created_at":"2018-02-09T01:32:21Z","updated_at":"2018-02-09T19:21:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0016789ecd871d4e3a657c8677ab8c4df2fc4bf5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"karlding","id":6836385,"avatar_url":"https://avatars2.githubusercontent.com/u/6836385?v=4","gravatar_id":"","url":"https://api.github.com/users/karlding","html_url":"https://github.com/karlding","followers_url":"https://api.github.com/users/karlding/followers","following_url":"https://api.github.com/users/karlding/following{/other_user}","gists_url":"https://api.github.com/users/karlding/gists{/gist_id}","starred_url":"https://api.github.com/users/karlding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlding/subscriptions","organizations_url":"https://api.github.com/users/karlding/orgs","repos_url":"https://api.github.com/users/karlding/repos","events_url":"https://api.github.com/users/karlding/events{/privacy}","received_events_url":"https://api.github.com/users/karlding/received_events","type":"User","site_admin":false},{"login":"ckitagawa","id":9539007,"avatar_url":"https://avatars0.githubusercontent.com/u/9539007?v=4","gravatar_id":"","url":"https://api.github.com/users/ckitagawa","html_url":"https://github.com/ckitagawa","followers_url":"https://api.github.com/users/ckitagawa/followers","following_url":"https://api.github.com/users/ckitagawa/following{/other_user}","gists_url":"https://api.github.com/users/ckitagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/ckitagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckitagawa/subscriptions","organizations_url":"https://api.github.com/users/ckitagawa/orgs","repos_url":"https://api.github.com/users/ckitagawa/repos","events_url":"https://api.github.com/users/ckitagawa/events{/privacy}","received_events_url":"https://api.github.com/users/ckitagawa/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/123/commits","review_comments_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/123/comments","review_comment_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uw-midsun/firmware/issues/123/comments","statuses_url":"https://api.github.com/repos/uw-midsun/firmware/statuses/da04a28ceee14c18ba6c0ddf333096c5038771eb","head":{"label":"uw-midsun:elec_217_ads1015_2","ref":"elec_217_ads1015_2","sha":"da04a28ceee14c18ba6c0ddf333096c5038771eb","user":{"login":"uw-midsun","id":14828575,"avatar_url":"https://avatars1.githubusercontent.com/u/14828575?v=4","gravatar_id":"","url":"https://api.github.com/users/uw-midsun","html_url":"https://github.com/uw-midsun","followers_url":"https://api.github.com/users/uw-midsun/followers","following_url":"https://api.github.com/users/uw-midsun/following{/other_user}","gists_url":"https://api.github.com/users/uw-midsun/gists{/gist_id}","starred_url":"https://api.github.com/users/uw-midsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uw-midsun/subscriptions","organizations_url":"https://api.github.com/users/uw-midsun/orgs","repos_url":"https://api.github.com/users/uw-midsun/repos","events_url":"https://api.github.com/users/uw-midsun/events{/privacy}","received_events_url":"https://api.github.com/users/uw-midsun/received_events","type":"Organization","site_admin":false},"repo":{"id":69197028,"name":"firmware","full_name":"uw-midsun/firmware","owner":{"login":"uw-midsun","id":14828575,"avatar_url":"https://avatars1.githubusercontent.com/u/14828575?v=4","gravatar_id":"","url":"https://api.github.com/users/uw-midsun","html_url":"https://github.com/uw-midsun","followers_url":"https://api.github.com/users/uw-midsun/followers","following_url":"https://api.github.com/users/uw-midsun/following{/other_user}","gists_url":"https://api.github.com/users/uw-midsun/gists{/gist_id}","starred_url":"https://api.github.com/users/uw-midsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uw-midsun/subscriptions","organizations_url":"https://api.github.com/users/uw-midsun/orgs","repos_url":"https://api.github.com/users/uw-midsun/repos","events_url":"https://api.github.com/users/uw-midsun/events{/privacy}","received_events_url":"https://api.github.com/users/uw-midsun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uw-midsun/firmware","description":"Firmware for MSXII","fork":false,"url":"https://api.github.com/repos/uw-midsun/firmware","forks_url":"https://api.github.com/repos/uw-midsun/firmware/forks","keys_url":"https://api.github.com/repos/uw-midsun/firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uw-midsun/firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uw-midsun/firmware/teams","hooks_url":"https://api.github.com/repos/uw-midsun/firmware/hooks","issue_events_url":"https://api.github.com/repos/uw-midsun/firmware/issues/events{/number}","events_url":"https://api.github.com/repos/uw-midsun/firmware/events","assignees_url":"https://api.github.com/repos/uw-midsun/firmware/assignees{/user}","branches_url":"https://api.github.com/repos/uw-midsun/firmware/branches{/branch}","tags_url":"https://api.github.com/repos/uw-midsun/firmware/tags","blobs_url":"https://api.github.com/repos/uw-midsun/firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uw-midsun/firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uw-midsun/firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/uw-midsun/firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uw-midsun/firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/uw-midsun/firmware/languages","stargazers_url":"https://api.github.com/repos/uw-midsun/firmware/stargazers","contributors_url":"https://api.github.com/repos/uw-midsun/firmware/contributors","subscribers_url":"https://api.github.com/repos/uw-midsun/firmware/subscribers","subscription_url":"https://api.github.com/repos/uw-midsun/firmware/subscription","commits_url":"https://api.github.com/repos/uw-midsun/firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/uw-midsun/firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/uw-midsun/firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/uw-midsun/firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/uw-midsun/firmware/contents/{+path}","compare_url":"https://api.github.com/repos/uw-midsun/firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uw-midsun/firmware/merges","archive_url":"https://api.github.com/repos/uw-midsun/firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uw-midsun/firmware/downloads","issues_url":"https://api.github.com/repos/uw-midsun/firmware/issues{/number}","pulls_url":"https://api.github.com/repos/uw-midsun/firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/uw-midsun/firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/uw-midsun/firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uw-midsun/firmware/labels{/name}","releases_url":"https://api.github.com/repos/uw-midsun/firmware/releases{/id}","deployments_url":"https://api.github.com/repos/uw-midsun/firmware/deployments","created_at":"2016-09-25T23:38:58Z","updated_at":"2018-01-13T20:38:13Z","pushed_at":"2018-02-09T06:18:30Z","git_url":"git://github.com/uw-midsun/firmware.git","ssh_url":"git@github.com:uw-midsun/firmware.git","clone_url":"https://github.com/uw-midsun/firmware.git","svn_url":"https://github.com/uw-midsun/firmware","homepage":"","size":3611,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"uw-midsun:master","ref":"master","sha":"c17bdf83b9bddddf56137aa2280930c4d63acf4e","user":{"login":"uw-midsun","id":14828575,"avatar_url":"https://avatars1.githubusercontent.com/u/14828575?v=4","gravatar_id":"","url":"https://api.github.com/users/uw-midsun","html_url":"https://github.com/uw-midsun","followers_url":"https://api.github.com/users/uw-midsun/followers","following_url":"https://api.github.com/users/uw-midsun/following{/other_user}","gists_url":"https://api.github.com/users/uw-midsun/gists{/gist_id}","starred_url":"https://api.github.com/users/uw-midsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uw-midsun/subscriptions","organizations_url":"https://api.github.com/users/uw-midsun/orgs","repos_url":"https://api.github.com/users/uw-midsun/repos","events_url":"https://api.github.com/users/uw-midsun/events{/privacy}","received_events_url":"https://api.github.com/users/uw-midsun/received_events","type":"Organization","site_admin":false},"repo":{"id":69197028,"name":"firmware","full_name":"uw-midsun/firmware","owner":{"login":"uw-midsun","id":14828575,"avatar_url":"https://avatars1.githubusercontent.com/u/14828575?v=4","gravatar_id":"","url":"https://api.github.com/users/uw-midsun","html_url":"https://github.com/uw-midsun","followers_url":"https://api.github.com/users/uw-midsun/followers","following_url":"https://api.github.com/users/uw-midsun/following{/other_user}","gists_url":"https://api.github.com/users/uw-midsun/gists{/gist_id}","starred_url":"https://api.github.com/users/uw-midsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uw-midsun/subscriptions","organizations_url":"https://api.github.com/users/uw-midsun/orgs","repos_url":"https://api.github.com/users/uw-midsun/repos","events_url":"https://api.github.com/users/uw-midsun/events{/privacy}","received_events_url":"https://api.github.com/users/uw-midsun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uw-midsun/firmware","description":"Firmware for MSXII","fork":false,"url":"https://api.github.com/repos/uw-midsun/firmware","forks_url":"https://api.github.com/repos/uw-midsun/firmware/forks","keys_url":"https://api.github.com/repos/uw-midsun/firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uw-midsun/firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uw-midsun/firmware/teams","hooks_url":"https://api.github.com/repos/uw-midsun/firmware/hooks","issue_events_url":"https://api.github.com/repos/uw-midsun/firmware/issues/events{/number}","events_url":"https://api.github.com/repos/uw-midsun/firmware/events","assignees_url":"https://api.github.com/repos/uw-midsun/firmware/assignees{/user}","branches_url":"https://api.github.com/repos/uw-midsun/firmware/branches{/branch}","tags_url":"https://api.github.com/repos/uw-midsun/firmware/tags","blobs_url":"https://api.github.com/repos/uw-midsun/firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uw-midsun/firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uw-midsun/firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/uw-midsun/firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uw-midsun/firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/uw-midsun/firmware/languages","stargazers_url":"https://api.github.com/repos/uw-midsun/firmware/stargazers","contributors_url":"https://api.github.com/repos/uw-midsun/firmware/contributors","subscribers_url":"https://api.github.com/repos/uw-midsun/firmware/subscribers","subscription_url":"https://api.github.com/repos/uw-midsun/firmware/subscription","commits_url":"https://api.github.com/repos/uw-midsun/firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/uw-midsun/firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/uw-midsun/firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/uw-midsun/firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/uw-midsun/firmware/contents/{+path}","compare_url":"https://api.github.com/repos/uw-midsun/firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uw-midsun/firmware/merges","archive_url":"https://api.github.com/repos/uw-midsun/firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uw-midsun/firmware/downloads","issues_url":"https://api.github.com/repos/uw-midsun/firmware/issues{/number}","pulls_url":"https://api.github.com/repos/uw-midsun/firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/uw-midsun/firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/uw-midsun/firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uw-midsun/firmware/labels{/name}","releases_url":"https://api.github.com/repos/uw-midsun/firmware/releases{/id}","deployments_url":"https://api.github.com/repos/uw-midsun/firmware/deployments","created_at":"2016-09-25T23:38:58Z","updated_at":"2018-01-13T20:38:13Z","pushed_at":"2018-02-09T06:18:30Z","git_url":"git://github.com/uw-midsun/firmware.git","ssh_url":"git@github.com:uw-midsun/firmware.git","clone_url":"https://github.com/uw-midsun/firmware.git","svn_url":"https://github.com/uw-midsun/firmware","homepage":"","size":3611,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/123"},"html":{"href":"https://github.com/uw-midsun/firmware/pull/123"},"issue":{"href":"https://api.github.com/repos/uw-midsun/firmware/issues/123"},"comments":{"href":"https://api.github.com/repos/uw-midsun/firmware/issues/123/comments"},"review_comments":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/123/comments"},"review_comment":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/123/commits"},"statuses":{"href":"https://api.github.com/repos/uw-midsun/firmware/statuses/da04a28ceee14c18ba6c0ddf333096c5038771eb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"a3farmah"}}