{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments/146303890","pull_request_review_id":71224483,"id":146303890,"diff_hunk":"@@ -30,37 +30,147 @@ extern \"C\" {\n #endif\n \n /**\n- * \\defgroup hal_rtc RTC hal functions\n+ * \\defgroup hal_rtc RTC hal\n+ *\n+ * The RTC hal provides a low level interface to the Real Time Counter (RTC) of a\n+ * target.\n+ *\n+ * # Defined behavior\n+ * * The function ::rtc_init is safe to call repeatedly - Verified by test ::rtc_init_test\n+ * * RTC accuracy is at least 10% - Verified by test ::rtc_accuracy_test\n+ * * Init/free doesn't stop RTC from counting - Verified by test ::rtc_persist_test\n+ * * Software reset doesn't stop RTC from counting - Verified by ::rtc_reset_test\n+ * * Sleep modes don't stop RTC from counting - Verified by ::rtc_sleep_test\n+ * * Shutdown mode doesn't stop RTC from counting - Not verified\n+ * * The functions ::rtc_write/::rtc_read provides availability to set/get RTC time - Verified by ::rtc_write_read_test\n+ * * The functions ::rtc_isenabled returns 1 if the RTC is counting and the time has been set, 0 otherwise - Verified by ::rtc_enabled_test\n+ *\n+ * # Undefined behavior\n+ * * Calling any function other than ::rtc_init before the initialization of the RTC\n+ *\n+ * # Potential bugs\n+ * * Incorrect overflow handling - Verified by ::rtc_range_test\n+ * * Glitches due to ripple counter - Verified by ::rtc_glitch_test\n+ *\n+ * @see hal_rtc_tests\n+ *\n  * @{\n  */\n \n+/**\n+ * \\defgroup hal_rtc_tests RTC hal tests\n+ * The RTC test validate proper implementation of the RTC hal.\n+ *\n+ * To run the RTC hal tests use the command:\n+ *\n+ *     mbed test -t <toolchain> -m <target> -n tests-mbed_hal-rtc*\n+ */\n+\n+\n /** Initialize the RTC peripheral\n  *\n+ * Powerup the RTC in perpetration for access. This function must be called\n+ * before any other RTC functions ares called. This does not change the state","path":"hal/rtc_api.h","position":45,"original_position":45,"commit_id":"2aad555b425c6fa4d33f51d3e4cc4b23b5cd9191","original_commit_id":"2aad555b425c6fa4d33f51d3e4cc4b23b5cd9191","user":{"login":"bulislaw","id":107253,"avatar_url":"https://avatars2.githubusercontent.com/u/107253?v=4","gravatar_id":"","url":"https://api.github.com/users/bulislaw","html_url":"https://github.com/bulislaw","followers_url":"https://api.github.com/users/bulislaw/followers","following_url":"https://api.github.com/users/bulislaw/following{/other_user}","gists_url":"https://api.github.com/users/bulislaw/gists{/gist_id}","starred_url":"https://api.github.com/users/bulislaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulislaw/subscriptions","organizations_url":"https://api.github.com/users/bulislaw/orgs","repos_url":"https://api.github.com/users/bulislaw/repos","events_url":"https://api.github.com/users/bulislaw/events{/privacy}","received_events_url":"https://api.github.com/users/bulislaw/received_events","type":"User","site_admin":false},"body":"Do we test that that actually does not change the state? Eg does not reset the counter?","created_at":"2017-10-23T15:27:08Z","updated_at":"2017-10-23T15:28:11Z","html_url":"https://github.com/ARMmbed/mbed-os/pull/5306#discussion_r146303890","pull_request_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5306","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments/146303890"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/5306#discussion_r146303890"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5306"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5306","id":146187197,"html_url":"https://github.com/ARMmbed/mbed-os/pull/5306","diff_url":"https://github.com/ARMmbed/mbed-os/pull/5306.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/5306.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5306","number":5306,"state":"open","locked":false,"title":"Update of RTC HAL API specification and tests.","user":{"login":"mprse","id":30721012,"avatar_url":"https://avatars0.githubusercontent.com/u/30721012?v=4","gravatar_id":"","url":"https://api.github.com/users/mprse","html_url":"https://github.com/mprse","followers_url":"https://api.github.com/users/mprse/followers","following_url":"https://api.github.com/users/mprse/following{/other_user}","gists_url":"https://api.github.com/users/mprse/gists{/gist_id}","starred_url":"https://api.github.com/users/mprse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mprse/subscriptions","organizations_url":"https://api.github.com/users/mprse/orgs","repos_url":"https://api.github.com/users/mprse/repos","events_url":"https://api.github.com/users/mprse/events{/privacy}","received_events_url":"https://api.github.com/users/mprse/received_events","type":"User","site_admin":false},"body":"## Description\r\nThis patch provides updates of artefacts provided in PR https://github.com/ARMmbed/mbed-os/pull/5226.\r\n\r\n\r\nThis patch provides the following updates:\r\n- description of RTC HAL API tests in given/when/then format,\r\n- minor fixes in existing test cases,\r\n- additional test cases.\r\n\r\n\r\n## Status\r\n**READY**\r\n\r\n\r\n## Migrations\r\nNO\r\n\r\n\r\n## Related PRs\r\nfeature-hal-spec-rtc | https://github.com/ARMmbed/mbed-os/pull/5226\r\n\r\n\r\n\r\n## Todos\r\nProvided additional test case rtc_enabled_test() is in conflict with rtc_persist_test() test case. \r\n\r\nDocumentation describes rtc_isenabled() function as follows:\r\n\r\n> RTC has the time set and is counting\r\n\r\nI assume that some test should be created for this function, but its behaviour is unclear. I understand this description as follows:\r\n\"RTC is counting\" - RTC has been initialised by means of rtc_init() function.\r\n\"RTC has the time set\" - RTC time value has been set by means of rtc_write() function.\r\nSince rtc_isenabled() can not be called before rtc_init(), test case which checks if rtc_isenabled() returns:\r\n- 0 after initialisation and before time has been set,\r\n- 1 after initialisation and time set operation,\r\nhas been created.\r\nThis case is inconsistent with test case which checks RTC persistence, which assumes that rtc_isenabled() returns 1 after rtc_init() call (if time has been set earlier).\r\n\r\n\r\n","created_at":"2017-10-12T11:46:35Z","updated_at":"2017-10-23T15:28:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29492ce9001f331cb67ce3c6f4b476bc7cab6839","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5306/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5306/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5306/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/2aad555b425c6fa4d33f51d3e4cc4b23b5cd9191","head":{"label":"mprse:feature-hal-spec-rtc_tests-update","ref":"feature-hal-spec-rtc_tests-update","sha":"2aad555b425c6fa4d33f51d3e4cc4b23b5cd9191","user":{"login":"mprse","id":30721012,"avatar_url":"https://avatars0.githubusercontent.com/u/30721012?v=4","gravatar_id":"","url":"https://api.github.com/users/mprse","html_url":"https://github.com/mprse","followers_url":"https://api.github.com/users/mprse/followers","following_url":"https://api.github.com/users/mprse/following{/other_user}","gists_url":"https://api.github.com/users/mprse/gists{/gist_id}","starred_url":"https://api.github.com/users/mprse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mprse/subscriptions","organizations_url":"https://api.github.com/users/mprse/orgs","repos_url":"https://api.github.com/users/mprse/repos","events_url":"https://api.github.com/users/mprse/events{/privacy}","received_events_url":"https://api.github.com/users/mprse/received_events","type":"User","site_admin":false},"repo":{"id":100368044,"name":"mbed-os","full_name":"mprse/mbed-os","owner":{"login":"mprse","id":30721012,"avatar_url":"https://avatars0.githubusercontent.com/u/30721012?v=4","gravatar_id":"","url":"https://api.github.com/users/mprse","html_url":"https://github.com/mprse","followers_url":"https://api.github.com/users/mprse/followers","following_url":"https://api.github.com/users/mprse/following{/other_user}","gists_url":"https://api.github.com/users/mprse/gists{/gist_id}","starred_url":"https://api.github.com/users/mprse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mprse/subscriptions","organizations_url":"https://api.github.com/users/mprse/orgs","repos_url":"https://api.github.com/users/mprse/repos","events_url":"https://api.github.com/users/mprse/events{/privacy}","received_events_url":"https://api.github.com/users/mprse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mprse/mbed-os","description":"ARM mbed OS is a platform operating system designed for the internet of things","fork":true,"url":"https://api.github.com/repos/mprse/mbed-os","forks_url":"https://api.github.com/repos/mprse/mbed-os/forks","keys_url":"https://api.github.com/repos/mprse/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mprse/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mprse/mbed-os/teams","hooks_url":"https://api.github.com/repos/mprse/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/mprse/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/mprse/mbed-os/events","assignees_url":"https://api.github.com/repos/mprse/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/mprse/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/mprse/mbed-os/tags","blobs_url":"https://api.github.com/repos/mprse/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mprse/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mprse/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/mprse/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mprse/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/mprse/mbed-os/languages","stargazers_url":"https://api.github.com/repos/mprse/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/mprse/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/mprse/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/mprse/mbed-os/subscription","commits_url":"https://api.github.com/repos/mprse/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/mprse/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/mprse/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/mprse/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/mprse/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/mprse/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mprse/mbed-os/merges","archive_url":"https://api.github.com/repos/mprse/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mprse/mbed-os/downloads","issues_url":"https://api.github.com/repos/mprse/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/mprse/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/mprse/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/mprse/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mprse/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/mprse/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/mprse/mbed-os/deployments","created_at":"2017-08-15T10:48:25Z","updated_at":"2017-08-15T10:50:43Z","pushed_at":"2017-10-23T13:34:31Z","git_url":"git://github.com/mprse/mbed-os.git","ssh_url":"git@github.com:mprse/mbed-os.git","clone_url":"https://github.com/mprse/mbed-os.git","svn_url":"https://github.com/mprse/mbed-os","homepage":"https://mbed.com","size":174955,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARMmbed:feature-hal-spec-rtc","ref":"feature-hal-spec-rtc","sha":"0e1cc569182e70cbea2412b6b4db2ef8605d93e9","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":8270972,"name":"mbed-os","full_name":"ARMmbed/mbed-os","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/mbed-os","description":"ARM mbed OS is a platform operating system designed for the internet of things","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbed-os","forks_url":"https://api.github.com/repos/ARMmbed/mbed-os/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbed-os/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbed-os/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbed-os/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbed-os/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbed-os/deployments","created_at":"2013-02-18T15:23:11Z","updated_at":"2017-10-23T06:15:31Z","pushed_at":"2017-10-23T14:41:36Z","git_url":"git://github.com/ARMmbed/mbed-os.git","ssh_url":"git@github.com:ARMmbed/mbed-os.git","clone_url":"https://github.com/ARMmbed/mbed-os.git","svn_url":"https://github.com/ARMmbed/mbed-os","homepage":"https://mbed.com","size":176137,"stargazers_count":1272,"watchers_count":1272,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1189,"mirror_url":null,"archived":false,"open_issues_count":531,"forks":1189,"open_issues":531,"watchers":1272,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5306"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/5306"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5306"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5306/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5306/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5306/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/2aad555b425c6fa4d33f51d3e4cc4b23b5cd9191"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bulislaw"}}