{"action":"created","comment":{"url":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments/197602097","pull_request_review_id":131384365,"id":197602097,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzYwMjA5Nw==","diff_hunk":"@@ -0,0 +1,43 @@\n+#pragma once\n+// Module used to control the brightness of the driver display screens.\n+// Also defines display screen parameters such as frequency and number of screens\n+\n+#include \"adc.h\"\n+#include \"gpio.h\"\n+#include \"pwm.h\"\n+#include \"soft_timer.h\"\n+\n+#define DRIVER_DISPLAY_CONFIG_NUM_SCREENS 2\n+\n+#define DRIVER_DISPLAY_CONFIG_SCREEN1_FREQ_HZ 30000  // Frequency in Hz (subject to change)\n+#define DRIVER_DISPLAY_CONFIG_SCREEN2_FREQ_HZ 30000  // Frequency in Hz (subject to change)\n+\n+#define DRIVER_DISPLAY_CONFIG_REFRESH_PERIOD 5\n+\n+typedef enum {\n+  DRIVER_DISPLAY_SCREEN1 = 0,\n+  DRIVER_DISPLAY_SCREEN2,\n+} DriverDisplayBrightnessScreen;\n+\n+typedef struct {\n+  GPIOAddress address;\n+  GPIOSettings settings;\n+  PWMTimer timer;\n+  uint16_t frequency_hz;  // frequency in Hz\n+} DriverDisplayBrightnessScreenData;\n+\n+typedef struct {\n+  GPIOAddress address;\n+  GPIOSettings settings;\n+  ADCChannel channel;\n+  uint16_t max;\n+  uint16_t min;\n+  uint16_t percent_reading;\n+} DriverDisplayBrightnessSensorData;\n+\n+typedef struct {\n+  DriverDisplayBrightnessScreenData *screen_data;\n+  DriverDisplayBrightnessSensorData sensor_data;\n+} DriverDisplayBrightnessData;","path":"projects/driver_display/inc/driver_display_brightness.h","position":41,"original_position":41,"commit_id":"b18ce115d4c2b9d045e917ecbf4314a6cc362021","original_commit_id":"b18ce115d4c2b9d045e917ecbf4314a6cc362021","user":{"login":"tituschow","id":5583338,"node_id":"MDQ6VXNlcjU1ODMzMzg=","avatar_url":"https://avatars0.githubusercontent.com/u/5583338?v=4","gravatar_id":"","url":"https://api.github.com/users/tituschow","html_url":"https://github.com/tituschow","followers_url":"https://api.github.com/users/tituschow/followers","following_url":"https://api.github.com/users/tituschow/following{/other_user}","gists_url":"https://api.github.com/users/tituschow/gists{/gist_id}","starred_url":"https://api.github.com/users/tituschow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tituschow/subscriptions","organizations_url":"https://api.github.com/users/tituschow/orgs","repos_url":"https://api.github.com/users/tituschow/repos","events_url":"https://api.github.com/users/tituschow/events{/privacy}","received_events_url":"https://api.github.com/users/tituschow/received_events","type":"User","site_admin":false},"body":"This doesn't follow our convention. I don't know how to use your module from looking at this. What do I configure? What needs to persist? What should be initialized beforehand?","created_at":"2018-06-23T04:22:39Z","updated_at":"2018-06-23T04:22:39Z","html_url":"https://github.com/uw-midsun/firmware/pull/262#discussion_r197602097","pull_request_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/262","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/comments/197602097"},"html":{"href":"https://github.com/uw-midsun/firmware/pull/262#discussion_r197602097"},"pull_request":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/262"}}},"pull_request":{"url":"https://api.github.com/repos/uw-midsun/firmware/pulls/262","id":195388546,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1Mzg4NTQ2","html_url":"https://github.com/uw-midsun/firmware/pull/262","diff_url":"https://github.com/uw-midsun/firmware/pull/262.diff","patch_url":"https://github.com/uw-midsun/firmware/pull/262.patch","issue_url":"https://api.github.com/repos/uw-midsun/firmware/issues/262","number":262,"state":"open","locked":false,"title":"ELEC 434: Display brightness adjust","user":{"login":"andyjiin","id":34169386,"node_id":"MDQ6VXNlcjM0MTY5Mzg2","avatar_url":"https://avatars1.githubusercontent.com/u/34169386?v=4","gravatar_id":"","url":"https://api.github.com/users/andyjiin","html_url":"https://github.com/andyjiin","followers_url":"https://api.github.com/users/andyjiin/followers","following_url":"https://api.github.com/users/andyjiin/following{/other_user}","gists_url":"https://api.github.com/users/andyjiin/gists{/gist_id}","starred_url":"https://api.github.com/users/andyjiin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyjiin/subscriptions","organizations_url":"https://api.github.com/users/andyjiin/orgs","repos_url":"https://api.github.com/users/andyjiin/repos","events_url":"https://api.github.com/users/andyjiin/events{/privacy}","received_events_url":"https://api.github.com/users/andyjiin/received_events","type":"User","site_admin":false},"body":"- nothing to activate calibration mode yet\r\n- currently sampling brightness every 5s ","created_at":"2018-06-17T18:11:39Z","updated_at":"2018-06-23T04:22:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03ab1c7698aad4d7728133ce845fe88543719cc4","assignee":null,"assignees":[],"requested_reviewers":[{"login":"karlding","id":6836385,"node_id":"MDQ6VXNlcjY4MzYzODU=","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,"node_id":"MDQ6VXNlcjk1MzkwMDc=","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},{"login":"ArshanKhanifar","id":10492324,"node_id":"MDQ6VXNlcjEwNDkyMzI0","avatar_url":"https://avatars1.githubusercontent.com/u/10492324?v=4","gravatar_id":"","url":"https://api.github.com/users/ArshanKhanifar","html_url":"https://github.com/ArshanKhanifar","followers_url":"https://api.github.com/users/ArshanKhanifar/followers","following_url":"https://api.github.com/users/ArshanKhanifar/following{/other_user}","gists_url":"https://api.github.com/users/ArshanKhanifar/gists{/gist_id}","starred_url":"https://api.github.com/users/ArshanKhanifar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArshanKhanifar/subscriptions","organizations_url":"https://api.github.com/users/ArshanKhanifar/orgs","repos_url":"https://api.github.com/users/ArshanKhanifar/repos","events_url":"https://api.github.com/users/ArshanKhanifar/events{/privacy}","received_events_url":"https://api.github.com/users/ArshanKhanifar/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/262/commits","review_comments_url":"https://api.github.com/repos/uw-midsun/firmware/pulls/262/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/262/comments","statuses_url":"https://api.github.com/repos/uw-midsun/firmware/statuses/b18ce115d4c2b9d045e917ecbf4314a6cc362021","head":{"label":"uw-midsun:elec_434_display_brightness","ref":"elec_434_display_brightness","sha":"b18ce115d4c2b9d045e917ecbf4314a6cc362021","user":{"login":"uw-midsun","id":14828575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODI4NTc1","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,"node_id":"MDEwOlJlcG9zaXRvcnk2OTE5NzAyOA==","name":"firmware","full_name":"uw-midsun/firmware","owner":{"login":"uw-midsun","id":14828575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODI4NTc1","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-06-22T02:04:17Z","pushed_at":"2018-06-23T04:18:50Z","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":3227,"stargazers_count":3,"watchers_count":3,"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":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":12,"watchers":3,"default_branch":"master"}},"base":{"label":"uw-midsun:master","ref":"master","sha":"88bc0471a1a310bf5d0bbdc317bb310b65512599","user":{"login":"uw-midsun","id":14828575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODI4NTc1","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,"node_id":"MDEwOlJlcG9zaXRvcnk2OTE5NzAyOA==","name":"firmware","full_name":"uw-midsun/firmware","owner":{"login":"uw-midsun","id":14828575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODI4NTc1","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-06-22T02:04:17Z","pushed_at":"2018-06-23T04:18:50Z","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":3227,"stargazers_count":3,"watchers_count":3,"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":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/262"},"html":{"href":"https://github.com/uw-midsun/firmware/pull/262"},"issue":{"href":"https://api.github.com/repos/uw-midsun/firmware/issues/262"},"comments":{"href":"https://api.github.com/repos/uw-midsun/firmware/issues/262/comments"},"review_comments":{"href":"https://api.github.com/repos/uw-midsun/firmware/pulls/262/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/262/commits"},"statuses":{"href":"https://api.github.com/repos/uw-midsun/firmware/statuses/b18ce115d4c2b9d045e917ecbf4314a6cc362021"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tituschow"}}