{"action":"opened","number":2992,"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2992","id":35567718,"html_url":"https://github.com/RIOT-OS/RIOT/pull/2992","diff_url":"https://github.com/RIOT-OS/RIOT/pull/2992.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/2992.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2992","number":2992,"state":"open","locked":false,"title":"periph_pwm: Return actual frequency (like the docs say)","user":{"login":"gebart","id":317506,"avatar_url":"https://avatars.githubusercontent.com/u/317506?v=3","gravatar_id":"","url":"https://api.github.com/users/gebart","html_url":"https://github.com/gebart","followers_url":"https://api.github.com/users/gebart/followers","following_url":"https://api.github.com/users/gebart/following{/other_user}","gists_url":"https://api.github.com/users/gebart/gists{/gist_id}","starred_url":"https://api.github.com/users/gebart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gebart/subscriptions","organizations_url":"https://api.github.com/users/gebart/orgs","repos_url":"https://api.github.com/users/gebart/repos","events_url":"https://api.github.com/users/gebart/events{/privacy}","received_events_url":"https://api.github.com/users/gebart/received_events","type":"User","site_admin":false},"body":"The documentation and the implementation were not entirely coherent for the PWM peripheral API.\r\n\r\nThis PR changes the return value of `pwm_init` to be the actual frequency achieved by the PWM peripheral.\r\n\r\nThe long description of `pwm_init` in Doxygen has the following text:\r\n\r\n>The desired frequency and resolution may not be possible on a given device when chosen too large. In this case the PWM driver will always keep the resolution and decrease the frequency if needed. **To verify the correct settings compare the returned value which is the actually set frequency.**\r\n\r\nReturning the actual frequency achieved is useful in cases where the timing is more important than the resolution.\r\n\r\nSTM32F3, STM32F4 and LPC2387 seem to use a very flexible prescaler for the PWM clock and can achieve almost any frequency requested, but the Kinetis platforms only support prescaler values that are a power of two, and only up to 128 (1, 2, 4, 8, 16, 32, 64, 128). ","created_at":"2015-05-16T08:15:57Z","updated_at":"2015-05-16T08:15:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2992/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2992/comments","review_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2992/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/7eb9aa2b5a5278afaf7ad73dbbd5ce098cc9da54","head":{"label":"gebart:pr/pwm-return-value","ref":"pr/pwm-return-value","sha":"7eb9aa2b5a5278afaf7ad73dbbd5ce098cc9da54","user":{"login":"gebart","id":317506,"avatar_url":"https://avatars.githubusercontent.com/u/317506?v=3","gravatar_id":"","url":"https://api.github.com/users/gebart","html_url":"https://github.com/gebart","followers_url":"https://api.github.com/users/gebart/followers","following_url":"https://api.github.com/users/gebart/following{/other_user}","gists_url":"https://api.github.com/users/gebart/gists{/gist_id}","starred_url":"https://api.github.com/users/gebart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gebart/subscriptions","organizations_url":"https://api.github.com/users/gebart/orgs","repos_url":"https://api.github.com/users/gebart/repos","events_url":"https://api.github.com/users/gebart/events{/privacy}","received_events_url":"https://api.github.com/users/gebart/received_events","type":"User","site_admin":false},"repo":{"id":20130177,"name":"RIOT","full_name":"gebart/RIOT","owner":{"login":"gebart","id":317506,"avatar_url":"https://avatars.githubusercontent.com/u/317506?v=3","gravatar_id":"","url":"https://api.github.com/users/gebart","html_url":"https://github.com/gebart","followers_url":"https://api.github.com/users/gebart/followers","following_url":"https://api.github.com/users/gebart/following{/other_user}","gists_url":"https://api.github.com/users/gebart/gists{/gist_id}","starred_url":"https://api.github.com/users/gebart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gebart/subscriptions","organizations_url":"https://api.github.com/users/gebart/orgs","repos_url":"https://api.github.com/users/gebart/repos","events_url":"https://api.github.com/users/gebart/events{/privacy}","received_events_url":"https://api.github.com/users/gebart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gebart/RIOT","description":"RIOT -  The friendly OS for IoT","fork":true,"url":"https://api.github.com/repos/gebart/RIOT","forks_url":"https://api.github.com/repos/gebart/RIOT/forks","keys_url":"https://api.github.com/repos/gebart/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gebart/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gebart/RIOT/teams","hooks_url":"https://api.github.com/repos/gebart/RIOT/hooks","issue_events_url":"https://api.github.com/repos/gebart/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/gebart/RIOT/events","assignees_url":"https://api.github.com/repos/gebart/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/gebart/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/gebart/RIOT/tags","blobs_url":"https://api.github.com/repos/gebart/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gebart/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gebart/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/gebart/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gebart/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/gebart/RIOT/languages","stargazers_url":"https://api.github.com/repos/gebart/RIOT/stargazers","contributors_url":"https://api.github.com/repos/gebart/RIOT/contributors","subscribers_url":"https://api.github.com/repos/gebart/RIOT/subscribers","subscription_url":"https://api.github.com/repos/gebart/RIOT/subscription","commits_url":"https://api.github.com/repos/gebart/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/gebart/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/gebart/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/gebart/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/gebart/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/gebart/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gebart/RIOT/merges","archive_url":"https://api.github.com/repos/gebart/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gebart/RIOT/downloads","issues_url":"https://api.github.com/repos/gebart/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/gebart/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/gebart/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/gebart/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gebart/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/gebart/RIOT/releases{/id}","created_at":"2014-05-24T13:31:43Z","updated_at":"2015-05-06T11:59:03Z","pushed_at":"2015-05-16T08:07:05Z","git_url":"git://github.com/gebart/RIOT.git","ssh_url":"git@github.com:gebart/RIOT.git","clone_url":"https://github.com/gebart/RIOT.git","svn_url":"https://github.com/gebart/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":22312,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"RIOT-OS:master","ref":"master","sha":"2bc7c4ba5f974def7a97bc680d7f81757efaf3b8","user":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"repo":{"id":7370241,"name":"RIOT","full_name":"RIOT-OS/RIOT","owner":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RIOT-OS/RIOT","description":"RIOT -  The friendly OS for IoT","fork":false,"url":"https://api.github.com/repos/RIOT-OS/RIOT","forks_url":"https://api.github.com/repos/RIOT-OS/RIOT/forks","keys_url":"https://api.github.com/repos/RIOT-OS/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RIOT-OS/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RIOT-OS/RIOT/teams","hooks_url":"https://api.github.com/repos/RIOT-OS/RIOT/hooks","issue_events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/events","assignees_url":"https://api.github.com/repos/RIOT-OS/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/RIOT-OS/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/tags","blobs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/RIOT-OS/RIOT/languages","stargazers_url":"https://api.github.com/repos/RIOT-OS/RIOT/stargazers","contributors_url":"https://api.github.com/repos/RIOT-OS/RIOT/contributors","subscribers_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscribers","subscription_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscription","commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/RIOT-OS/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/RIOT-OS/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RIOT-OS/RIOT/merges","archive_url":"https://api.github.com/repos/RIOT-OS/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RIOT-OS/RIOT/downloads","issues_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/RIOT-OS/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/RIOT-OS/RIOT/releases{/id}","created_at":"2012-12-29T20:38:40Z","updated_at":"2015-05-16T00:12:16Z","pushed_at":"2015-05-16T08:12:18Z","git_url":"git://github.com/RIOT-OS/RIOT.git","ssh_url":"git@github.com:RIOT-OS/RIOT.git","clone_url":"https://github.com/RIOT-OS/RIOT.git","svn_url":"https://github.com/RIOT-OS/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":110230,"stargazers_count":360,"watchers_count":360,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":292,"mirror_url":null,"open_issues_count":328,"forks":292,"open_issues":328,"watchers":360,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2992"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/2992"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2992"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2992/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2992/comments"},"review_comment":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2992/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/7eb9aa2b5a5278afaf7ad73dbbd5ce098cc9da54"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":10,"deletions":10,"changed_files":6}}