{"action":"created","comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/34276113","id":34276113,"diff_hunk":"@@ -0,0 +1,296 @@\n+/*\n+ * Copyright (C) 2014 Freie Universität Berlin\n+ *\n+ * This file is subject to the terms and conditions of the GNU Lesser\n+ * General Public License v2.1. See the file LICENSE in the top level\n+ * directory for more details.\n+ */\n+\n+/**\n+ * @ingroup     driver_lsm6ds3\n+ * @{\n+ *\n+ * @file\n+ * @brief       Device driver implementation for the LSM6DS3 3D accelerometer\n+ *              and 3D gyroscope\n+ *\n+ * @author      René Herthel <rene-herthel@outlook.de>\n+ *\n+ * @}\n+ */\n+\n+#include \"lsm6ds3.h\"\n+#include \"include/lsm6ds3-internal.h\"\n+\n+#define ENABLE_DEBUG (1)\n+#include \"debug.h\"\n+\n+int lsm6ds3_init(lsm6ds3_t *dev,\n+                 i2c i2c,\n+                 gpio_t acc_pin,\n+                 gpio_t gyr_pin,\n+                 uint8_t acc_address,\n+                 lsm6ds3_acc_sample_rate_t sample_rate,\n+                 lsm6ds3_acc_scale_t acc_scale,\n+                 lsm6ds3_acc_bandwith_t acc_bandwith,\n+                 uint_8_t gyr_address,\n+                 lsm6ds3_gyr_sample_rate_t gyr_sample_rate,\n+                 lsm6ds3_gyr_scale_t gyr_scale,\n+                 lsm6ds3_gyr_scale_125_t gyr_scale_125)\n+{\n+    int res = 0;\n+    char tmp;\n+\n+\t  dev->i2c = i2c;\n+\t  dev->acc_address = acc_address;\n+\t  dev->gyr_address = gyr_address;\n+\t  dev->acc_pin = acc_pin;\n+\t  dev->gyr_pin = gyr_pin;\n+\n+\t  i2c_acquire(dev->i2c);\n+\t  i2c_init_master(i2c, I2C_SPEED_NORMAL);\n+\t  DEBUG(\"LSM6DS3: reboot ... \");\n+    res += i2c_write_reg(dev->i2c, dev->acc_address,\n+                         LSM6DS3_REG_CTRL3_C, LSM6DS3_REG_CTRL3_C_BOOT);\n+\t  i2c_release(dev->i2c);","path":"drivers/lsm6ds3/lsm6ds3.c","position":55,"original_position":55,"commit_id":"e23c6d24676e2c454011cfba5f6f8d67c2b556f6","original_commit_id":"e23c6d24676e2c454011cfba5f6f8d67c2b556f6","user":{"login":"ReneHerthel","id":11684241,"avatar_url":"https://avatars.githubusercontent.com/u/11684241?v=3","gravatar_id":"","url":"https://api.github.com/users/ReneHerthel","html_url":"https://github.com/ReneHerthel","followers_url":"https://api.github.com/users/ReneHerthel/followers","following_url":"https://api.github.com/users/ReneHerthel/following{/other_user}","gists_url":"https://api.github.com/users/ReneHerthel/gists{/gist_id}","starred_url":"https://api.github.com/users/ReneHerthel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReneHerthel/subscriptions","organizations_url":"https://api.github.com/users/ReneHerthel/orgs","repos_url":"https://api.github.com/users/ReneHerthel/repos","events_url":"https://api.github.com/users/ReneHerthel/events{/privacy}","received_events_url":"https://api.github.com/users/ReneHerthel/received_events","type":"User","site_admin":false},"body":"same as above","created_at":"2015-07-09T16:48:36Z","updated_at":"2015-07-09T16:48:36Z","html_url":"https://github.com/RIOT-OS/RIOT/pull/3263#discussion_r34276113","pull_request_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/3263","_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/34276113"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/3263#discussion_r34276113"},"pull_request":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/3263"}}},"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/3263","id":38571500,"html_url":"https://github.com/RIOT-OS/RIOT/pull/3263","diff_url":"https://github.com/RIOT-OS/RIOT/pull/3263.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/3263.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/3263","number":3263,"state":"open","locked":false,"title":"LSM6DS3 driver implementation","user":{"login":"ReneHerthel","id":11684241,"avatar_url":"https://avatars.githubusercontent.com/u/11684241?v=3","gravatar_id":"","url":"https://api.github.com/users/ReneHerthel","html_url":"https://github.com/ReneHerthel","followers_url":"https://api.github.com/users/ReneHerthel/followers","following_url":"https://api.github.com/users/ReneHerthel/following{/other_user}","gists_url":"https://api.github.com/users/ReneHerthel/gists{/gist_id}","starred_url":"https://api.github.com/users/ReneHerthel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReneHerthel/subscriptions","organizations_url":"https://api.github.com/users/ReneHerthel/orgs","repos_url":"https://api.github.com/users/ReneHerthel/repos","events_url":"https://api.github.com/users/ReneHerthel/events{/privacy}","received_events_url":"https://api.github.com/users/ReneHerthel/received_events","type":"User","site_admin":false},"body":"Needed for the port of the board: La Blue Frog.\r\n\r\nboard: RIOT port for La Blue Frog https://github.com/RIOT-OS/RIOT/issues/3020\r\n\r\n@PeterKietzmann Here's my first implementation for the lsm6ds3 driver, but there are still some TODO's, which I have to handle in the next time..","created_at":"2015-06-25T17:21:03Z","updated_at":"2015-07-09T16:48:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb20afd847402e4b2d9f4ff2e9d18ae6eef598b9","assignee":{"login":"PeterKietzmann","id":7765855,"avatar_url":"https://avatars.githubusercontent.com/u/7765855?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterKietzmann","html_url":"https://github.com/PeterKietzmann","followers_url":"https://api.github.com/users/PeterKietzmann/followers","following_url":"https://api.github.com/users/PeterKietzmann/following{/other_user}","gists_url":"https://api.github.com/users/PeterKietzmann/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterKietzmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterKietzmann/subscriptions","organizations_url":"https://api.github.com/users/PeterKietzmann/orgs","repos_url":"https://api.github.com/users/PeterKietzmann/repos","events_url":"https://api.github.com/users/PeterKietzmann/events{/privacy}","received_events_url":"https://api.github.com/users/PeterKietzmann/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/3263/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/3263/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/3263/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/e23c6d24676e2c454011cfba5f6f8d67c2b556f6","head":{"label":"ReneHerthel:driver_lsm6ds3","ref":"driver_lsm6ds3","sha":"e23c6d24676e2c454011cfba5f6f8d67c2b556f6","user":{"login":"ReneHerthel","id":11684241,"avatar_url":"https://avatars.githubusercontent.com/u/11684241?v=3","gravatar_id":"","url":"https://api.github.com/users/ReneHerthel","html_url":"https://github.com/ReneHerthel","followers_url":"https://api.github.com/users/ReneHerthel/followers","following_url":"https://api.github.com/users/ReneHerthel/following{/other_user}","gists_url":"https://api.github.com/users/ReneHerthel/gists{/gist_id}","starred_url":"https://api.github.com/users/ReneHerthel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReneHerthel/subscriptions","organizations_url":"https://api.github.com/users/ReneHerthel/orgs","repos_url":"https://api.github.com/users/ReneHerthel/repos","events_url":"https://api.github.com/users/ReneHerthel/events{/privacy}","received_events_url":"https://api.github.com/users/ReneHerthel/received_events","type":"User","site_admin":false},"repo":{"id":33403944,"name":"RIOT","full_name":"ReneHerthel/RIOT","owner":{"login":"ReneHerthel","id":11684241,"avatar_url":"https://avatars.githubusercontent.com/u/11684241?v=3","gravatar_id":"","url":"https://api.github.com/users/ReneHerthel","html_url":"https://github.com/ReneHerthel","followers_url":"https://api.github.com/users/ReneHerthel/followers","following_url":"https://api.github.com/users/ReneHerthel/following{/other_user}","gists_url":"https://api.github.com/users/ReneHerthel/gists{/gist_id}","starred_url":"https://api.github.com/users/ReneHerthel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReneHerthel/subscriptions","organizations_url":"https://api.github.com/users/ReneHerthel/orgs","repos_url":"https://api.github.com/users/ReneHerthel/repos","events_url":"https://api.github.com/users/ReneHerthel/events{/privacy}","received_events_url":"https://api.github.com/users/ReneHerthel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ReneHerthel/RIOT","description":"RIOT -  The friendly OS for IoT","fork":true,"url":"https://api.github.com/repos/ReneHerthel/RIOT","forks_url":"https://api.github.com/repos/ReneHerthel/RIOT/forks","keys_url":"https://api.github.com/repos/ReneHerthel/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReneHerthel/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReneHerthel/RIOT/teams","hooks_url":"https://api.github.com/repos/ReneHerthel/RIOT/hooks","issue_events_url":"https://api.github.com/repos/ReneHerthel/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/ReneHerthel/RIOT/events","assignees_url":"https://api.github.com/repos/ReneHerthel/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/ReneHerthel/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/ReneHerthel/RIOT/tags","blobs_url":"https://api.github.com/repos/ReneHerthel/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReneHerthel/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReneHerthel/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReneHerthel/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReneHerthel/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/ReneHerthel/RIOT/languages","stargazers_url":"https://api.github.com/repos/ReneHerthel/RIOT/stargazers","contributors_url":"https://api.github.com/repos/ReneHerthel/RIOT/contributors","subscribers_url":"https://api.github.com/repos/ReneHerthel/RIOT/subscribers","subscription_url":"https://api.github.com/repos/ReneHerthel/RIOT/subscription","commits_url":"https://api.github.com/repos/ReneHerthel/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReneHerthel/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReneHerthel/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReneHerthel/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReneHerthel/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/ReneHerthel/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReneHerthel/RIOT/merges","archive_url":"https://api.github.com/repos/ReneHerthel/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReneHerthel/RIOT/downloads","issues_url":"https://api.github.com/repos/ReneHerthel/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/ReneHerthel/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/ReneHerthel/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/ReneHerthel/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReneHerthel/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/ReneHerthel/RIOT/releases{/id}","created_at":"2015-04-04T11:56:08Z","updated_at":"2015-04-04T11:57:05Z","pushed_at":"2015-06-30T13:15:53Z","git_url":"git://github.com/ReneHerthel/RIOT.git","ssh_url":"git@github.com:ReneHerthel/RIOT.git","clone_url":"https://github.com/ReneHerthel/RIOT.git","svn_url":"https://github.com/ReneHerthel/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":17880,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ffcf9521f0bda471b27ef577096a274876db2423","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-07-08T05:32:23Z","pushed_at":"2015-07-09T16:10:19Z","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":118558,"stargazers_count":433,"watchers_count":433,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":329,"mirror_url":null,"open_issues_count":356,"forks":329,"open_issues":356,"watchers":433,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/3263"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/3263"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/3263"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/3263/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/3263/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/3263/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/e23c6d24676e2c454011cfba5f6f8d67c2b556f6"}}}}