GitHub PullRequestReviewCommentEvent at 2014-10-06 14:05:31
Repository: RIOT
Actor: LudwigOrtmann
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/18457929","id":18457929,"diff_hunk":"@@ -0,0 +1,479 @@\n+/*\n+* Copyright (C) 2014 Hamburg University of Applied Sciences\n+*\n+* This file is subject to the terms and conditions of the GNU Lesser General\n+* Public License v2.1. See the file LICENSE in the top level directory for more\n+* details.\n+*/\n+\n+/**\n+ * @ingroup     cpu_sam3x8e\n+ * @{\n+ *\n+ * @file        spi.c\n+ * @brief       Low-level SPI driver implementation\n+ *\n+ * @author      Maxime Blanloeil <maxime.blanloeil@phelma.grenoble-inp.fr>\n+ * @author      Peter Kietzmann  <peter.kietzmann@haw-hamburg.de>\n+ *\n+ * @}\n+ */\n+\n+\n+#include \"cpu.h\"\n+#include \"sched.h\"\n+#include \"thread.h\"\n+#include \"periph/gpio.h\"\n+#include \"periph_conf.h\"\n+#include \"periph/spi.h\"\n+#include \"sam3x8e.h\"\n+\n+\n+#if SPI_NUMOF\n+\n+typedef struct {\n+    char(*cb)(char data);\n+} spi_state_t;\n+\n+static inline void irq_handler_transfer(spi_t dev);\n+\n+static spi_state_t spi_config[SPI_NUMOF];\n+\n+\n+void spi_poweron(spi_t dev)\n+{\n+    switch (dev) {\n+#if SPI_0_EN\n+\n+        case SPI_0:\n+            SPI_0_CLKEN();\n+            SPI_0_MISO_PORT_CLKEN();\n+            SPI_0_MOSI_PORT_CLKEN();\n+            SPI_0_SCK_PORT_CLKEN();\n+            break;\n+#endif\n+    }\n+}\n+\n+void spi_poweroff(spi_t dev)\n+{\n+    switch (dev) {\n+#if SPI_0_EN\n+\n+        case SPI_0:\n+            while (!(SPI_0_DEV->SPI_SR & SPI_SR_SPIENS)); /* wait until no more busy */\n+\n+            SPI_0_CLKDIS();\n+            NVIC_DisableIRQ(SPI_0_IRQ);\n+            break;\n+#endif\n+    }\n+}\n+\n+int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed)\n+{\n+","path":"cpu/sam3x8e/periph/spi.c","position":75,"original_position":75,"commit_id":"db5a7c990e3872c9b2525e307d624af2399d8199","original_commit_id":"db5a7c990e3872c9b2525e307d624af2399d8199","user":{"login":"LudwigOrtmann","id":3739173,"avatar_url":"https://avatars.githubusercontent.com/u/3739173?v=2","gravatar_id":"","url":"https://api.github.com/users/LudwigOrtmann","html_url":"https://github.com/LudwigOrtmann","followers_url":"https://api.github.com/users/LudwigOrtmann/followers","following_url":"https://api.github.com/users/LudwigOrtmann/following{/other_user}","gists_url":"https://api.github.com/users/LudwigOrtmann/gists{/gist_id}","starred_url":"https://api.github.com/users/LudwigOrtmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LudwigOrtmann/subscriptions","organizations_url":"https://api.github.com/users/LudwigOrtmann/orgs","repos_url":"https://api.github.com/users/LudwigOrtmann/repos","events_url":"https://api.github.com/users/LudwigOrtmann/events{/privacy}","received_events_url":"https://api.github.com/users/LudwigOrtmann/received_events","type":"User","site_admin":false},"body":"please remove this (and possibly other prefixing) blank line(s)","created_at":"2014-10-06T14:05:31Z","updated_at":"2014-10-06T14:05:31Z","html_url":"https://github.com/RIOT-OS/RIOT/pull/1584#discussion_r18457929","pull_request_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/1584","_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/18457929"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/1584#discussion_r18457929"},"pull_request":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/1584"}}},"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/1584","id":19983675,"html_url":"https://github.com/RIOT-OS/RIOT/pull/1584","diff_url":"https://github.com/RIOT-OS/RIOT/pull/1584.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/1584.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/1584","number":1584,"state":"open","locked":false,"title":"cpu/board: updated  spi driver for arduino-due","user":{"login":"PeterKietzmann","id":7765855,"avatar_url":"https://avatars.githubusercontent.com/u/7765855?v=2","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},"body":"This PR should replace PR #1544 from @blanloem because his internship ended. It contains an updated and adapted version of the SPI low-level driver for arduino-due boards.","created_at":"2014-08-19T14:27:11Z","updated_at":"2014-10-06T14:05:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94050e71318f39c2ed2d1a306dbfe76d2af89393","assignee":{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars.githubusercontent.com/u/620834?v=2","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/1584/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/1584/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/1584/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/db5a7c990e3872c9b2525e307d624af2399d8199","head":{"label":"PeterKietzmann:add_sam3x_spi","ref":"add_sam3x_spi","sha":"db5a7c990e3872c9b2525e307d624af2399d8199","user":{"login":"PeterKietzmann","id":7765855,"avatar_url":"https://avatars.githubusercontent.com/u/7765855?v=2","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},"repo":{"id":20397381,"name":"RIOT","full_name":"PeterKietzmann/RIOT","owner":{"login":"PeterKietzmann","id":7765855,"avatar_url":"https://avatars.githubusercontent.com/u/7765855?v=2","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},"private":false,"html_url":"https://github.com/PeterKietzmann/RIOT","description":"RIOT -  The friendly OS for IoT","fork":true,"url":"https://api.github.com/repos/PeterKietzmann/RIOT","forks_url":"https://api.github.com/repos/PeterKietzmann/RIOT/forks","keys_url":"https://api.github.com/repos/PeterKietzmann/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PeterKietzmann/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PeterKietzmann/RIOT/teams","hooks_url":"https://api.github.com/repos/PeterKietzmann/RIOT/hooks","issue_events_url":"https://api.github.com/repos/PeterKietzmann/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/PeterKietzmann/RIOT/events","assignees_url":"https://api.github.com/repos/PeterKietzmann/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/PeterKietzmann/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/PeterKietzmann/RIOT/tags","blobs_url":"https://api.github.com/repos/PeterKietzmann/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PeterKietzmann/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PeterKietzmann/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/PeterKietzmann/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PeterKietzmann/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/PeterKietzmann/RIOT/languages","stargazers_url":"https://api.github.com/repos/PeterKietzmann/RIOT/stargazers","contributors_url":"https://api.github.com/repos/PeterKietzmann/RIOT/contributors","subscribers_url":"https://api.github.com/repos/PeterKietzmann/RIOT/subscribers","subscription_url":"https://api.github.com/repos/PeterKietzmann/RIOT/subscription","commits_url":"https://api.github.com/repos/PeterKietzmann/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/PeterKietzmann/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/PeterKietzmann/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/PeterKietzmann/RIOT/issues/comments/{number}","contents_url":"https://api.github.com/repos/PeterKietzmann/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/PeterKietzmann/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PeterKietzmann/RIOT/merges","archive_url":"https://api.github.com/repos/PeterKietzmann/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PeterKietzmann/RIOT/downloads","issues_url":"https://api.github.com/repos/PeterKietzmann/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/PeterKietzmann/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/PeterKietzmann/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/PeterKietzmann/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PeterKietzmann/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/PeterKietzmann/RIOT/releases{/id}","created_at":"2014-06-02T08:28:21Z","updated_at":"2014-07-23T15:19:15Z","pushed_at":"2014-10-06T12:25:32Z","git_url":"git://github.com/PeterKietzmann/RIOT.git","ssh_url":"git@github.com:PeterKietzmann/RIOT.git","clone_url":"https://github.com/PeterKietzmann/RIOT.git","svn_url":"https://github.com/PeterKietzmann/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":11737,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"49364da1b7a933a1e1717f2f43eb420de2ab5343","user":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=2","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=2","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":"2014-10-03T16:33:24Z","pushed_at":"2014-10-06T13:40:11Z","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":81292,"stargazers_count":172,"watchers_count":172,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":132,"mirror_url":null,"open_issues_count":232,"forks":132,"open_issues":232,"watchers":172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/1584"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/1584"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/1584"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/1584/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/1584/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/1584/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/db5a7c990e3872c9b2525e307d624af2399d8199"}}}}