{"action":"created","comment":{"url":"https://api.github.com/repos/hackndev/zinc/pulls/comments/30727319","id":30727319,"diff_hunk":"@@ -0,0 +1,37 @@\n+#![feature(no_std, core, start)]\n+#![no_std]\n+\n+extern crate core;\n+extern crate zinc;\n+\n+use zinc::hal::timer::Timer;\n+use zinc::hal::lpc17xx::{pin, timer};\n+use zinc::hal::pin::GpioDirection;\n+use zinc::hal::pin::Gpio;\n+use core::option::Option::Some;\n+\n+#[start]\n+fn start(_: isize, _: *const *const u8) -> isize {\n+    main();\n+    0\n+}\n+\n+pub fn main() {\n+    zinc::hal::mem_init::init_stack();\n+    zinc::hal::mem_init::init_data();\n+    \n+    // P1.20 => LED-2 (mbed LPC1768)\n+    let led2 = pin::Pin::new(\n+        pin::Port::Port1, 21,\n+        pin::Function::Gpio,\n+        Some(GpioDirection::Out));\n+\n+    let timer = timer::Timer::new(timer::TimerPeripheral::Timer0, 25, 4);\n+    \n+    loop  {\n+        led2.set_high();\n+        timer.wait_ms(10);\n+        led2.set_low();\n+        timer.wait_ms(10);\n+    }\n+}","path":"examples/app_blink.rs","position":37,"original_position":37,"commit_id":"3a74354ac783c36572dc11da23a35b2a9990efb8","original_commit_id":"1aee6c878a722e0d16139f147fda06a91a0e1f4a","user":{"login":"mcoffin","id":1236452,"avatar_url":"https://avatars.githubusercontent.com/u/1236452?v=3","gravatar_id":"","url":"https://api.github.com/users/mcoffin","html_url":"https://github.com/mcoffin","followers_url":"https://api.github.com/users/mcoffin/followers","following_url":"https://api.github.com/users/mcoffin/following{/other_user}","gists_url":"https://api.github.com/users/mcoffin/gists{/gist_id}","starred_url":"https://api.github.com/users/mcoffin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcoffin/subscriptions","organizations_url":"https://api.github.com/users/mcoffin/orgs","repos_url":"https://api.github.com/users/mcoffin/repos","events_url":"https://api.github.com/users/mcoffin/events{/privacy}","received_events_url":"https://api.github.com/users/mcoffin/received_events","type":"User","site_admin":false},"body":"I actually think it would be nice to have some non-pt examples, especially since PT might be on it's way to restructuring (see #284). I don't know much about what needs to be done to correctly initialize the lpc17xx as I actually don't have **any** of the hardware currently supported by zinc... Working on SAM3X support though in [mcoffin/sam3x](/mcoffin/zinc/tree/sam3x). If you open a PR with a working blink example though, I'll pull it.","created_at":"2015-05-20T17:34:55Z","updated_at":"2015-05-20T17:34:55Z","html_url":"https://github.com/hackndev/zinc/pull/285#discussion_r30727319","pull_request_url":"https://api.github.com/repos/hackndev/zinc/pulls/285","_links":{"self":{"href":"https://api.github.com/repos/hackndev/zinc/pulls/comments/30727319"},"html":{"href":"https://github.com/hackndev/zinc/pull/285#discussion_r30727319"},"pull_request":{"href":"https://api.github.com/repos/hackndev/zinc/pulls/285"}}},"pull_request":{"url":"https://api.github.com/repos/hackndev/zinc/pulls/285","id":35579270,"html_url":"https://github.com/hackndev/zinc/pull/285","diff_url":"https://github.com/hackndev/zinc/pull/285.diff","patch_url":"https://github.com/hackndev/zinc/pull/285.patch","issue_url":"https://api.github.com/repos/hackndev/zinc/issues/285","number":285,"state":"open","locked":false,"title":"Cargo Build System + Nightly Updates","user":{"login":"mcoffin","id":1236452,"avatar_url":"https://avatars.githubusercontent.com/u/1236452?v=3","gravatar_id":"","url":"https://api.github.com/users/mcoffin","html_url":"https://github.com/mcoffin","followers_url":"https://api.github.com/users/mcoffin/followers","following_url":"https://api.github.com/users/mcoffin/following{/other_user}","gists_url":"https://api.github.com/users/mcoffin/gists{/gist_id}","starred_url":"https://api.github.com/users/mcoffin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcoffin/subscriptions","organizations_url":"https://api.github.com/users/mcoffin/orgs","repos_url":"https://api.github.com/users/mcoffin/repos","events_url":"https://api.github.com/users/mcoffin/events{/privacy}","received_events_url":"https://api.github.com/users/mcoffin/received_events","type":"User","site_admin":false},"body":"Don't pull this directly as it has a TON of stupidly small commits. I'll squash them when we deem it ready.\r\n\r\nThis uses cargo to do most of the heavy lifting as far as the compilation of rust (and even the final linking). I tried to make it a lot less of a fully custom build system and more of a small Makefile built on top of cargo to get us the last few steps of the way.\r\n\r\nI also fixed a lot of the fallout from rust updates on nightly, some of which were easier than others.\r\n\r\nMost notably: this also means that people can create their own cargo projects and just list zinc, platformtree, etc as dependencies.","created_at":"2015-05-16T23:56:57Z","updated_at":"2015-05-20T17:34:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3d45945939092768b7d44b4df8fe27cb41460a2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hackndev/zinc/pulls/285/commits","review_comments_url":"https://api.github.com/repos/hackndev/zinc/pulls/285/comments","review_comment_url":"https://api.github.com/repos/hackndev/zinc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hackndev/zinc/issues/285/comments","statuses_url":"https://api.github.com/repos/hackndev/zinc/statuses/3a74354ac783c36572dc11da23a35b2a9990efb8","head":{"label":"mcoffin:new-build","ref":"new-build","sha":"3a74354ac783c36572dc11da23a35b2a9990efb8","user":{"login":"mcoffin","id":1236452,"avatar_url":"https://avatars.githubusercontent.com/u/1236452?v=3","gravatar_id":"","url":"https://api.github.com/users/mcoffin","html_url":"https://github.com/mcoffin","followers_url":"https://api.github.com/users/mcoffin/followers","following_url":"https://api.github.com/users/mcoffin/following{/other_user}","gists_url":"https://api.github.com/users/mcoffin/gists{/gist_id}","starred_url":"https://api.github.com/users/mcoffin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcoffin/subscriptions","organizations_url":"https://api.github.com/users/mcoffin/orgs","repos_url":"https://api.github.com/users/mcoffin/repos","events_url":"https://api.github.com/users/mcoffin/events{/privacy}","received_events_url":"https://api.github.com/users/mcoffin/received_events","type":"User","site_admin":false},"repo":{"id":35502745,"name":"zinc","full_name":"mcoffin/zinc","owner":{"login":"mcoffin","id":1236452,"avatar_url":"https://avatars.githubusercontent.com/u/1236452?v=3","gravatar_id":"","url":"https://api.github.com/users/mcoffin","html_url":"https://github.com/mcoffin","followers_url":"https://api.github.com/users/mcoffin/followers","following_url":"https://api.github.com/users/mcoffin/following{/other_user}","gists_url":"https://api.github.com/users/mcoffin/gists{/gist_id}","starred_url":"https://api.github.com/users/mcoffin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcoffin/subscriptions","organizations_url":"https://api.github.com/users/mcoffin/orgs","repos_url":"https://api.github.com/users/mcoffin/repos","events_url":"https://api.github.com/users/mcoffin/events{/privacy}","received_events_url":"https://api.github.com/users/mcoffin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcoffin/zinc","description":"The bare metal stack for rust","fork":true,"url":"https://api.github.com/repos/mcoffin/zinc","forks_url":"https://api.github.com/repos/mcoffin/zinc/forks","keys_url":"https://api.github.com/repos/mcoffin/zinc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcoffin/zinc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcoffin/zinc/teams","hooks_url":"https://api.github.com/repos/mcoffin/zinc/hooks","issue_events_url":"https://api.github.com/repos/mcoffin/zinc/issues/events{/number}","events_url":"https://api.github.com/repos/mcoffin/zinc/events","assignees_url":"https://api.github.com/repos/mcoffin/zinc/assignees{/user}","branches_url":"https://api.github.com/repos/mcoffin/zinc/branches{/branch}","tags_url":"https://api.github.com/repos/mcoffin/zinc/tags","blobs_url":"https://api.github.com/repos/mcoffin/zinc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcoffin/zinc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcoffin/zinc/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcoffin/zinc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcoffin/zinc/statuses/{sha}","languages_url":"https://api.github.com/repos/mcoffin/zinc/languages","stargazers_url":"https://api.github.com/repos/mcoffin/zinc/stargazers","contributors_url":"https://api.github.com/repos/mcoffin/zinc/contributors","subscribers_url":"https://api.github.com/repos/mcoffin/zinc/subscribers","subscription_url":"https://api.github.com/repos/mcoffin/zinc/subscription","commits_url":"https://api.github.com/repos/mcoffin/zinc/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcoffin/zinc/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcoffin/zinc/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcoffin/zinc/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcoffin/zinc/contents/{+path}","compare_url":"https://api.github.com/repos/mcoffin/zinc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcoffin/zinc/merges","archive_url":"https://api.github.com/repos/mcoffin/zinc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcoffin/zinc/downloads","issues_url":"https://api.github.com/repos/mcoffin/zinc/issues{/number}","pulls_url":"https://api.github.com/repos/mcoffin/zinc/pulls{/number}","milestones_url":"https://api.github.com/repos/mcoffin/zinc/milestones{/number}","notifications_url":"https://api.github.com/repos/mcoffin/zinc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcoffin/zinc/labels{/name}","releases_url":"https://api.github.com/repos/mcoffin/zinc/releases{/id}","created_at":"2015-05-12T17:31:10Z","updated_at":"2015-05-20T11:09:24Z","pushed_at":"2015-05-19T08:45:57Z","git_url":"git://github.com/mcoffin/zinc.git","ssh_url":"git@github.com:mcoffin/zinc.git","clone_url":"https://github.com/mcoffin/zinc.git","svn_url":"https://github.com/mcoffin/zinc","homepage":"zinc.rs","size":1994,"stargazers_count":4,"watchers_count":4,"language":"Rust","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":4,"default_branch":"master"}},"base":{"label":"hackndev:master","ref":"master","sha":"82e33bac51d8e3c938d5fa285d0c86030d29db7a","user":{"login":"hackndev","id":449366,"avatar_url":"https://avatars.githubusercontent.com/u/449366?v=3","gravatar_id":"","url":"https://api.github.com/users/hackndev","html_url":"https://github.com/hackndev","followers_url":"https://api.github.com/users/hackndev/followers","following_url":"https://api.github.com/users/hackndev/following{/other_user}","gists_url":"https://api.github.com/users/hackndev/gists{/gist_id}","starred_url":"https://api.github.com/users/hackndev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackndev/subscriptions","organizations_url":"https://api.github.com/users/hackndev/orgs","repos_url":"https://api.github.com/users/hackndev/repos","events_url":"https://api.github.com/users/hackndev/events{/privacy}","received_events_url":"https://api.github.com/users/hackndev/received_events","type":"Organization","site_admin":false},"repo":{"id":19034892,"name":"zinc","full_name":"hackndev/zinc","owner":{"login":"hackndev","id":449366,"avatar_url":"https://avatars.githubusercontent.com/u/449366?v=3","gravatar_id":"","url":"https://api.github.com/users/hackndev","html_url":"https://github.com/hackndev","followers_url":"https://api.github.com/users/hackndev/followers","following_url":"https://api.github.com/users/hackndev/following{/other_user}","gists_url":"https://api.github.com/users/hackndev/gists{/gist_id}","starred_url":"https://api.github.com/users/hackndev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackndev/subscriptions","organizations_url":"https://api.github.com/users/hackndev/orgs","repos_url":"https://api.github.com/users/hackndev/repos","events_url":"https://api.github.com/users/hackndev/events{/privacy}","received_events_url":"https://api.github.com/users/hackndev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hackndev/zinc","description":"The bare metal stack for rust","fork":false,"url":"https://api.github.com/repos/hackndev/zinc","forks_url":"https://api.github.com/repos/hackndev/zinc/forks","keys_url":"https://api.github.com/repos/hackndev/zinc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hackndev/zinc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hackndev/zinc/teams","hooks_url":"https://api.github.com/repos/hackndev/zinc/hooks","issue_events_url":"https://api.github.com/repos/hackndev/zinc/issues/events{/number}","events_url":"https://api.github.com/repos/hackndev/zinc/events","assignees_url":"https://api.github.com/repos/hackndev/zinc/assignees{/user}","branches_url":"https://api.github.com/repos/hackndev/zinc/branches{/branch}","tags_url":"https://api.github.com/repos/hackndev/zinc/tags","blobs_url":"https://api.github.com/repos/hackndev/zinc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hackndev/zinc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hackndev/zinc/git/refs{/sha}","trees_url":"https://api.github.com/repos/hackndev/zinc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hackndev/zinc/statuses/{sha}","languages_url":"https://api.github.com/repos/hackndev/zinc/languages","stargazers_url":"https://api.github.com/repos/hackndev/zinc/stargazers","contributors_url":"https://api.github.com/repos/hackndev/zinc/contributors","subscribers_url":"https://api.github.com/repos/hackndev/zinc/subscribers","subscription_url":"https://api.github.com/repos/hackndev/zinc/subscription","commits_url":"https://api.github.com/repos/hackndev/zinc/commits{/sha}","git_commits_url":"https://api.github.com/repos/hackndev/zinc/git/commits{/sha}","comments_url":"https://api.github.com/repos/hackndev/zinc/comments{/number}","issue_comment_url":"https://api.github.com/repos/hackndev/zinc/issues/comments{/number}","contents_url":"https://api.github.com/repos/hackndev/zinc/contents/{+path}","compare_url":"https://api.github.com/repos/hackndev/zinc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hackndev/zinc/merges","archive_url":"https://api.github.com/repos/hackndev/zinc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hackndev/zinc/downloads","issues_url":"https://api.github.com/repos/hackndev/zinc/issues{/number}","pulls_url":"https://api.github.com/repos/hackndev/zinc/pulls{/number}","milestones_url":"https://api.github.com/repos/hackndev/zinc/milestones{/number}","notifications_url":"https://api.github.com/repos/hackndev/zinc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hackndev/zinc/labels{/name}","releases_url":"https://api.github.com/repos/hackndev/zinc/releases{/id}","created_at":"2014-04-22T15:26:30Z","updated_at":"2015-05-20T17:10:26Z","pushed_at":"2015-05-19T08:27:38Z","git_url":"git://github.com/hackndev/zinc.git","ssh_url":"git@github.com:hackndev/zinc.git","clone_url":"https://github.com/hackndev/zinc.git","svn_url":"https://github.com/hackndev/zinc","homepage":"zinc.rs","size":3614,"stargazers_count":378,"watchers_count":378,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":46,"mirror_url":null,"open_issues_count":65,"forks":46,"open_issues":65,"watchers":378,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hackndev/zinc/pulls/285"},"html":{"href":"https://github.com/hackndev/zinc/pull/285"},"issue":{"href":"https://api.github.com/repos/hackndev/zinc/issues/285"},"comments":{"href":"https://api.github.com/repos/hackndev/zinc/issues/285/comments"},"review_comments":{"href":"https://api.github.com/repos/hackndev/zinc/pulls/285/comments"},"review_comment":{"href":"https://api.github.com/repos/hackndev/zinc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hackndev/zinc/pulls/285/commits"},"statuses":{"href":"https://api.github.com/repos/hackndev/zinc/statuses/3a74354ac783c36572dc11da23a35b2a9990efb8"}}}}